Skip to content

Instantly share code, notes, and snippets.

Last active July 29, 2019 20:41
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
# 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 7/29/2019
#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