https://github.com/kdhttps/node-basic
Basic Node JS Application + Mongo DB + Express + JWT :shaved_ice: :baby_bottle:
https://github.com/kdhttps/node-basic
boilerplate boilerplate-node expressjs jwt-authentication mongodb nodejs
Last synced: about 2 months ago
JSON representation
Basic Node JS Application + Mongo DB + Express + JWT :shaved_ice: :baby_bottle:
- Host: GitHub
- URL: https://github.com/kdhttps/node-basic
- Owner: kdhttps
- License: mit
- Created: 2018-05-09T18:20:37.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-08-03T14:21:38.000Z (almost 6 years ago)
- Last Synced: 2026-01-03T16:21:50.095Z (5 months ago)
- Topics: boilerplate, boilerplate-node, expressjs, jwt-authentication, mongodb, nodejs
- Language: JavaScript
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node JS API
Simple node js api project with jwt authentication with mongodb.
## Instruction
This is assumed that npm, node and mongodb are installed on the machine.
* node js >= 10.x.x
* npm >= 6.x.x
* mongodb >= 4.2.x
For installing node and npm please refer [here](https://nodejs.org/en/download/package-manager/).
For installing mongodb [here](https://docs.mongodb.com/manual/installation/).
> Note: I recommended to use npm@5, Because it provides `npm audit` facility to check vulnerability in your dependencies.
## Installation and Run
1. Clone the repository and move to cloned directory and hit:
```npm install```
This will install all the dependencies for the project.
2. To start the project hit:
```
node index.route.js
```
or
```
npm start
```
This will start the project on the port number as you specify in `.env` file. Default is `4040`, so you API is now on [https://localhost:4040](http://localhost:4040) url.
## Configuration
1. Configuration application using `.env` file by setting environment variable.
2. Disable JWT authentication
By commenting following line you can disabled JWT verification in index.route.js.
```
// app.use(expressJwt({secret: process.env.APP_SECRET}).unless(filter));
```
## License
MIT