The routes for the rest api are:
-
GET http://localhost:3000/download/username/usernamepassword
response: An html file with the given img file
-
POST http://localhost:3000/upload
request: name: username password: usernamepassword img: imgfile
-
PUT http://localhost:3000/update
request: name: username password: usernamepassword img: new imgfile
-
DELETE http://localhost:3000/delete/username/usernamepassword
For user auth, I have created a user database manually.
Stack used: Node.js, express, ejs