server
├── node_modules
├── api
│ └── user.js
├── db
│ └── conn.js
├── middlewares
│ └── auth.js
├── models
│ └── schema.js
├── public
│ ├── css
│ ├── js
│ └── images
├── routes
│ └── route.js
├── temp
│ ├── partials
│ └── views
├── .env
└── package.json
| Action | Path | Request | Description |
|---|---|---|---|
| Static files | http://localhost:3000/public | GET | this endpoint contains static files like css, js, images etc. |
| Create | http://localhost:3000/user/register | POST | This endpoint get user data, validate schema and create a user in database. |
| Update | http://localhost:3000/user/update/id | POST | This endpoint get user data along user ID and update the user data in database. |
| Delete | http://localhost:3000/user/delete | POST | This endpoint get get user data along user ID, verify password and delete the user. |
| Login | http://localhost:3000/user/login | POST | This endpoint get user credentials, verify it, check authorization and redirect to user panel. |
| Logout | http://localhost:3000/user/logout | GET | This endpoint is just logout the user If that user is logged in. |