NOTE: all commands should be run in a terminal/command prompt window. In general you'll have 2-3 terminal/command prompt windows open at once - one for running MongoDB (if not running by default / as a service), one for running node.js, and one for commands (mostly grunt)
Variables used in the instructions below; replace appropriately
GIT_NAME Joe Bob
GIT_EMAIL youremail@gmail.com
GIT_REPO_URL git@github.com:jackrabbitsgroup/my-app.git
GIT_REPO_URL_HTTPS https://github.com/jackrabbitsgroup/my-app.git
LOCAL_PARENT_FOLDER /website
LOCAL_FOLDER_NAME my-app
APP_DOMAIN localhost
APP_PORT 3000
- machine (global / program) installs (if you don't have them already)
- install git, nodejs, mongodb, phantomjs, java - see here for Mac or here for Windows or here for Linux
sudo npm install -g grunt-cli yo bower generator-mean-seed yuidocjs forever less
- IF using Github (to clone/push/pull from), set it up:
git config --global user.name "GIT_NAME"
git config --global user.email GIT_EMAIL
git config --global --add color.ui true
- Clone the Git repository
- In command prompt, navigate to the folder where you want the app to be created in
cd LOCAL_PARENT_FOLDER
git clone GIT_REPO_URL
- Go into your newly cloned directory:
cd LOCAL_FOLDER_NAME
- In command prompt, navigate to the folder where you want the app to be created in
- [Maybe] Setup configs (see below)
- Do some setup / installs
npm install && bower install
- NOTE: you'll have to re-run this any time
package.json
orbower.json
changes
- NOTE: you'll have to re-run this any time
grunt q
to build assets- NOTE: you'll have to re-run this any time a
*.less
(or_*.scss
) or*.html
file changes
- NOTE: you'll have to re-run this any time a
./node_modules/protractor/bin/webdriver-manager update
- for Protractor (local) tests
- start server and view app
node run.js
to start node server (make sure MongoDB is already running first)- Type
Ctrl + C
to quit/stop
- Type
- open a browser to
http://APP_DOMAIN:APP_PORT/
to view the site/app
- run tests (and confirm they all pass!)
grunt
- optional additional steps: see extra-setup.md
Make sure to leverage the available (sub)generators - i.e. for creating new pages/routes/controllers, directives, and services!
Run generators with yo mean-seed
and then select the sub-generator you want to use!
See configs.md in the docs
folder
See setup-detailed.md and running.md in the docs
folder.
These cloning steps above are for duplicating the app/website/code to OTHER servers/machines AFTER Yeoman has been run (once).
Give these steps to any fellow developers for them to get set up - they do NOT need to run Yeoman since you've already generated the app for them - the main generator for Yeoman only needs to be run ONCE (and later used for updates). Though other developers WILL use other Yeoman generators (i.e. for creating a new route), just not the main/core generator that builds the app from scratch the first time.