Skip to content

Amarpsp10/authentication-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Single Token Authentication using Nodejs & MongoDb

APIS handled by in Frontend | Frontend Repo : Link

Add .env variables

Variable NameMeaning
CONNECTION_URL MongoDb Connection URL
JWT_SECRET Create new secret for sign jwt token
PORT App listening port
EMAIL Account email for sending email to users
PASSWORD Account password to authenticate

It's recommanded to create email account for sending email other then gmail provider to avoid failure.


Run project locally

Run command in terminal

npm install && npm start

Run with Doker docker

  1. Run command in root directory to build image

    docker build . -t auth-api-image
    
  2. Start Container

    docker run -p 5000:5000 --name auth-api-container-name auth-api-image
    

    project is started at localhost at port 5000.

Releases

No releases published

Packages

No packages published