This API is part of my training on UDACITY, and allows students to understand the development of APIs with ExpressJS.
The purpose of this application is to provide learners with the skills necessary to develop an Express API on a NodeJS environment.
The only functionality of the application is the processing of JPG images through URL
To work with this project, you need to know JavaScript, TypeScript, ExpressJS and NodeJS.
This project was made with NodeJs v16.17.0 and npm 8.15.0
To install the dependencies, place yourself in the project folder and run the following command
npm install
start:dev
to start local server for developmentbuild
to build projectlint
to display ESLint issueslint:fix
to automatically fix ESLint issuestest
to run project tests
To run the local server, execute:
npm run start:dev
Default URL should be http://127.0.0.1:3000/
Tests are not required to run the API. But if you contribute, please run the tests before pushing to GitHub. To run the tests, execute:
npm run test
To build for production, execute:
npm run build
The outpout folder is dist
- Base URL: http://127.0.0.1:3000/
GET /
- General: returns home page with a simple description.
- Sample:
http://127.0.0.1:3000
GET /api/images
Parameter | Type | Description |
---|---|---|
filename |
string |
Required. File name on server |
width |
string |
Required. desired width |
height |
string |
Required. desired height |
- General: displays image with width and height provided.
- Sample:
http://127.0.0.1:3000/api/images?filename=encenadaport&width=300&height=400