๐ An example project for an Image Transforming Service.
This is a pure ESM project intended to be used with the latest Active LTS release of Node.js.
- Copy
.env.template
as.env
and fill the required variables. - run
yarn build
- run
yarn start
start
- start the server.dev
- start and restart the server on file changes.clean
- remove coverage data, Jest cache and transpiled files.prebuild
- lint source files and tests before building.build
- transpile TypeScript to ES6.build:watch
- interactive watch mode to automatically transpile source files.lint
- lint source files and tests.test
- run tests.test:watch
- interactive watch mode to automatically re-run tests.
The project can be started using docker-compose
docker-compose up
Assuming the server is started with PORT=3000
. The following REST APIs are exposed:
-
GET
http://localhost:3000/api/v1/images?source=image-url&height=1024&width=1024&fit=cover&quality=90
Transform the image of
source
followed with any of the optionswidth
,height
,fit
andquality
This project is started from node-typescript-boilerplate template.
Licensed under the APLv2. See the LICENSE file for details.