Skip to content

Instantly share code, notes, and snippets.

@bbrochier
Last active August 29, 2015 14:22
Show Gist options
  • Save bbrochier/38f593acbc3a3af1c9cd to your computer and use it in GitHub Desktop.
Save bbrochier/38f593acbc3a3af1c9cd to your computer and use it in GitHub Desktop.

#MEAN

http://www.bradoncode.com/tutorials/mean-stack-tutorial-part-1-setup/

##Setup

####1. Create folder for your application

mkdir [my app name]
cd [my app name]

####2. Generate app

yo meanjs

####3. Install dependencies

npm install

####4. Launch MongoDB server

mongod --dbPath [path to data folder]

####5. Launch NodeJS server

export NODE_ENV=development
OR
export NODE_ENV=production
npm start

####6. Display application http://localhost:3000

####7. Mongo GUI http://robomongo.org/

Local DB : localhost:27017

####8. POST request tool https://www.getpostman.com/

##Deploy

####1. Build application

grunt build

####2. Deploy to Heroku

git init
git add .
git commit -m "initial version"
heroku apps:create myMeanApp
git push heroku master
heroku config:set NODE_ENV=production

Open application

heroku open

View logs

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