clone this project then in the root folder run this command in terminal
npm install
to start the project run this command in terminal
npm run build && npm run start
Note Server Start at http://localhost:3000
run this command in terminal
npm run test
- to run eslint
npm run lint
- to run eslint with fix mode
npm run lint:fix
- to run prettier
npm run format
- to start the app with nodemon for hot reload on changes
npm run start:hot-reload
- to build the app and transpile typescript files to javascript
npm run build
there is one api endpoint in this application /api/images
which takes 3 queryString parameters all of them required
name
of type string for the image name, allowed names [encenadaport
,fjord
,icelandwaterfall
,palmtunnel
,santamonica
]width
of type number with minimum value (1) and maximum value (5000) for the desired image widthheight
of type number with minimum value (1) and maximum value (5000) for the desired image height
http://localhost:3000/api/images?name=encenadaport&height=500&width=500
allowed names [
encenadaport
,fjord
,icelandwaterfall
,palmtunnel
,santamonica
]
-
http://localhost:3000/api/images?name=encenadaport.jpg&height=500&width=500
-
http://localhost:3000/api/images?name=encenadaport
-
http://localhost:3000/api/images?name=encenadaport&height=500
-
http://localhost:3000/api/images?name=encenadaport&&width=500