REST API using Node.js, Express, mongoose and MongoDB + JWT Authentication and Google Authenticator.
-
Clone this repository
git clone https://github.com/DilanOjeda/rest-server-node.git cd rest-server-node
-
Install the npm packages
npm install
Also install
nodemon
globally, if you don't have it yet.npm install -g nodemon
-
Congfigure environment settings
Create a file with the following name and location
.env
and copy the contents from.env.example
into it. Replace the values with your specific configuration. Don't worry, this file is in the.gitignore
so it won't get pushed to github.# Database MONGODB_CNN= # Google Authenticator GOOGLE_CLIENT=
-
Running the app locally
Run this command, which is located in npm script in
package.json
file.npm run start