- Make sure you run the
npm install
command to install all the libraries used in this repository. - Create a
.env
file and declare your Database URL under the variableDB_URL
.
DB_URL=<your database url>
- In the root directory, run
npm run generateKeys
to generate a pair of public & private keys, which will be used to sign/verify the JWT token..gitignore
file will ignore these keys, and will not publish to remote repository.
You need to have the mongo
command running either in a terminal in the background, or in the your IDE terminal.
Once you have the database server running, just run npm start
command to start the development server.
For development purposes, the expiry time of the access token is set to 30 seconds whereas that of the refresh token
is set to 60 seconds. You may increase the expiry time in generateTokens
function inside utils/tokens.js
file.