Simple Node.js server for resizing or cropping images with sign up/log in.
- saving history of operations in MongoDB
- added API endpoint to get history of operations, ability to specify time range
CHECK OUT THE .ENV-EXAMPLE FILE! YOU NEED TO DELETE '-example' IN THE NAME AND PUT YOUR VALUES THERE. IT WON'T WORK WITHOUT IT!
localhost:3000/v1/page/signup
localhost:3000/v1/page/login
localhost:3000/v1/auth/google
curl --location --request POST 'localhost:3000/v1/auth/signup' \
--header 'Content-Type: application/json' \
--data-raw '{
"firstName": "Myrzik",
"lastName": "Kotiko",
"email": "myrzik@mailcom",
"password": "pass123"
}'
curl --location --request POST 'localhost:3000/v1/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "myrzik@mailcom",
"password": "pass123"
}'
curl --location --request GET 'localhost:3000/v1/auth/logout' \
curl --location --request GET 'localhost:3000/v1/auth/google' \
curl --location --request POST 'localhost:3000/v1/image/edit' \
--header 'Content-Type: multipart/form-data' \
--data-raw '{
"image": "image.png",
"width": "100px",
"height": "100px"
"radios": "crop"
}'
curl --location --request POST 'localhost:3000/v1/history/' \
--header 'Content-Type: application/json' \
--data-raw '{
"dateStart": "2020-10-01",
"dateFinish": "2020-10-13"
}'
curl --location --request GET 'localhost:3000/v1/csv' \
curl --location --request GET 'localhost:3000/v1/history/avg' \
curl --location --request POST 'localhost:3000/v1/history/avgUnique' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "kitty@email.com",
}'
curl --location --request GET 'localhost:3000/v1/history/sum' \
Install the dependencies and devDependencies and start the server.
$ cd server-for-resizing-cropping-images
$ npm i
$ npm start
MIT
Free Software, Hell Yeah! 🐶