- Install:
npm i
- Build:
npm run build
- Lint:
npm run lint
- Prettify:
npm run prettier
- Run unit tests:
npm run test
- Start server:
npm run start
- Start server in-dev mode:
npm run start:dev
- Start server build:
npm run start:build
The server will listen on port 3000:
http://localhost:3000/api/images
Expected query arguments are:
- filename: Available filenames are:
- encenadaport
- fjord
- icelandwaterfall
- palmtunnel
- santamonica
- width: numerical pixel value > 0
- height: numerical pixel value > 0 Note: width and height must not contain any string value.
http://localhost:3000/api/images Will display a hint
http://localhost:3000/api/images?filename=encenadaport Will display the original encenadaport image.
http://localhost:3000/api/images?filename=encenadaport&width=650&height=650 Will scale the encenadaport image to 650 by 650 pixels and store the resulting image. On subsequent calls will serve the resized image instead of resizing the original again.