Skip to content

Commit

Permalink
add readme.me
Browse files Browse the repository at this point in the history
  • Loading branch information
Purujit Srinivasan committed Dec 12, 2020
1 parent ba31a76 commit c0a32e5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
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

0 comments on commit c0a32e5

Please sign in to comment.