this is an image processing api that can use in multiple way:
- image placeholder service.
- image thumbs previewer.
to install the project please run npm i
or npm install
to build the project run npm run build
for testing run the following script npm run test
it will do the following:
- format the script (to format the script only use
npm run prettier
) - build the project to javascript (to build only use
npm run build
). - check the script for any errors (to check script only use
npm run eslint
) - test the whole project
to run project from typescript in developing mode run npm run dev
to start the javascript project after building it run npm run start
[NOTE: you should build before starting the javascript project]
valid endpoints to be tested
the server will run in port 3000
-
main endpoint:
localhost:3000/
this just saying hello world -
images endpoint:
localhost:3000/images
this is just an endpoint for future work if we can display all images here but now it just saying hello world from images route -
resize api endpoint (most important endpoint):
localhost:3000/images/resize?i={image_name}&w={width}&h={height}
don't forget to replace
image_name
andwidth
andheight
in the api url
valid image_name
= (01 || 02 || 03 || 04)