-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Purujit Srinivasan
committed
Dec 12, 2020
1 parent
ba31a76
commit c0a32e5
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Complete basic setup for user | ||
|
||
Server made using Express.js, Node.js, MongoDB | ||
|
||
Run by typing the following in shell/bash/cmd- | ||
npm start | ||
|
||
Features: | ||
|
||
- User model: firstName, lastName, email, admin. Implements passport-local-mongoose plugin for user | ||
- Authentication: Uses passport, passport-jwt, passport-local, jsonwebtoken for signup, login | ||
- Admin/normal user: Authentication has middleware for checking user/admin | ||
- JWT Blacklisting: To prevent logged out users with valid json web token from accessing their data, there is a blacklist database which stores such valid (but logged out) tokens | ||
- Cors: Cors middleware to ensure that source is only the white-listed one not any random | ||
- User operations: Apart from login, signup, logout- there is updateProfile to update name, deleteAccount to delete user from database and log them out | ||
|
||
[Note: This was not scaffolded using express-generator] | ||
|
||
Additional feature: | ||
|
||
- Clean exit: Press Ctrl+C in the shell/bash/cmd to exit server. Wait for the message: "Server successful shutdown". It may take some time as server finishes any pending tasks |