API Base using express with JWT token intergration. Uses Bcrypt to salt users passwords. MongoDB Database
- Rename
config_example.json
toconfig.json
- Edit params in
config.json
- Install dependancies with
npm install
- Start api server with
npm start
ornpm run servers.js
- Build upon it!!!
Name | Method | Endpoint | Headers | Params | Body |
---|---|---|---|---|---|
User Signup | POST | /user/signup | Content-Type= application/json |
N/A | {"firstname": "String", "lastname": "String", "email": "String@FQDN", "password": "String"} |
User Login | POST | /user/login | Content-Type= application/json |
N/A | {"email": "String", "password": "String" |
User Info | GET | /user/me | Authorization= "Bearer JWT_TOKEN" |
N/A | N/A |
User Edit | PUT | /user/me | Content-Type= application/json, Authorization= "Bearer JWT_TOKEN" |
N/A | {"ItemToEdit": "Value"} |
Admin User List | GET | /admin/userlist | Authorization= "Bearer JWT_TOKEN" |
N/A | N/A |
Admin User Edit | PUT | /admin/:userId | Content-Type= application/json, Authorization= "Bearer JWT_TOKEN" |
N/A | {{"ItemToEdit": "Value"}} |
Admin User Delete | DELETE | /admin/:userId | Authorization= "Bearer JWT_TOKEN" |
N/A | N/A |
Enjoy 😄