- Make sure you run the
npm installcommand to install all the libraries used in this repository. - Create a
.envfile and declare your Database URL under the variableDB_URL.
DB_URL=<your database url>
- In the root directory, run
npm run generateKeysto generate a pair of public & private keys, which will be used to sign/verify the JWT token..gitignorefile 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.