Skip to content

Instantly share code, notes, and snippets.

@dohoonk
Last active March 10, 2016 06:06
Show Gist options
  • Select an option

  • Save dohoonk/df8bbeb4df9eda7ca84c to your computer and use it in GitHub Desktop.

Select an option

Save dohoonk/df8bbeb4df9eda7ca84c to your computer and use it in GitHub Desktop.
Edditing in Git/Final Project/Taste of Node Js/Mongo db

#Peer review in Git Reset the master in history and make a pull request

look at the code and add comments

git reset example --hard git log git push -f origin master

review and add comments on the code


Final Project steps

1.Start with Wireframes 2.ERD/Trello


#Node JS Node js is a runtime

Installing Express JS npm install express -g rm -rf node modules

This code wil give us express command that scaffolds npm install -g express-generator

Generating templare for awesomeanswers express AwesomeAnswers

This command is like bundle in Rails npm install

This library will reolad the page npm install nodemon -g After run nodemon bin/www

mongo db

if it gives an error dir not existing run the code on console to create the dir sudo mkdir /data sudo mkdir /data/db

this will make you the owner of the directory sudo chown DHK /data/db

this command will get the mongoose running for you npm install mongoose --save

embadding is putting model into another one

npm install method-override --save


git add -A removes the changed file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment