This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sets up package.json file | |
npm init | |
# express is our main framework | |
# mongoose is used to connect/interact with MongoDB | |
# body-parser allows us to get the data throughout the request | |
# bcryptjs is a password hashing function designed by Niels Provos and David Mazières | |
# validation (as its name implies) is used for validation | |
npm i express mongoose body-parser bcryptjs validation | |
#nodemon is a utility that will monitor for any changes in your source and automatically restart your server. | |
npm i -D nodemon | |
#add .gitignore file | |
#taken from https://github.com/github/gitignore/blob/master/Node.gitignore 7/29/2019 | |
node_modules/ | |
#create app.js file in project directory | |
#add to package.json file: | |
"scripts": { | |
"start": "node app.js", | |
"app": "nodemon app.js", | |
} | |
# start server with following (run npm install if error) | |
npm run start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment