https://github.com/amass01/node-user-engine
An user authentication engine written in nodejs on a mongodb database.
https://github.com/amass01/node-user-engine
expressjs jwt jwt-authentication mongodb mongoose nodejs
Last synced: 3 months ago
JSON representation
An user authentication engine written in nodejs on a mongodb database.
- Host: GitHub
- URL: https://github.com/amass01/node-user-engine
- Owner: amass01
- Created: 2017-11-29T18:12:35.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-15T14:01:53.000Z (over 8 years ago)
- Last Synced: 2025-08-17T11:16:16.563Z (11 months ago)
- Topics: expressjs, jwt, jwt-authentication, mongodb, mongoose, nodejs
- Language: JavaScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# node-user-engine
An Express.js authentication seed server, written on top of mongo database.
###### Local dev:
- Simply clone the source code and run `npm run start` to start the app on port `9191`
##### Endpoints:
- `/` - main route shows welcome message
- Method: GET
- Not authenticated - can be reached without token
- `/api/user` - list all users
- Method: GET
- Authenticated
- `/api/user/create` - creates new user
- Method: POST
- Authenticated
- Payload: ` { name: string, password: string, isAdmin: boolean} `
- Response: `{ success: boolean } `
- `/api/authenticate` - verify user's password against db and return token on success.
- Method: POST
- Not authenticated - can be reached without token
- Payload: ` { name: string, password: string, isAdmin: boolean} `
- Response: `{ success: boolean, token: string } `