MongoDB, Express, Node
run the script at the first level: (You need to add a JWT_SECRET in .env to connect to MongoDB)
// in the root level
$ echo "JWT_SECRET=YOUR_JWT_SECRET" >> ./server/src/.env
$ cd server // go to server folder
$ npm i // npm install pacakges
$ npm run dev // run it locally
// http://localhost:8000 be available
$ npm run build // this will build the server code to es5 js codes and generate a dist file
Server-side |
---|
bcrypt-nodejs: ^0.0.3 |
body-parser: ^1.15.2 |
cors: ^2.8.1 |
dotenv: ^2.0.0 |
express: ^4.14.0 |
jwt-simple: ^0.5.1 |
mongoose: ^4.7.4 |
morgan: ^1.7.0 |
- Feel free to find me on GitHub and LiveCoding
- or visit my page