-
npm install
-
In the root of your project, create a
.env
file:touch .env
-
In
.env
, add a secret key variable to create your token. Do not put quotes around it:JWTSECRET=dieselisthebest123!
-
POST
/api/users/signup
-
POST
/api/users/login
-
GET
/api/users
-
POST
/api/users
To decode a token -
GET
/api/users/:id
You must have a valid token to see your route.
If the token doesn't belong to that user id
gatlin-carrier / express-jwt-mongo-auth-starter Goto Github PK
View Code? Open in Web Editor NEWThis project forked from marcwright/express-jwt-mongo-auth-starter