- Set up Node (see below)
make setup
(ask someone for key)- Add the following line to
/etc/hosts/
:127.0.0.1 localhost local.esl.com
- Set up postgres (see below)
- Start postgres
postgres -D /usr/local/var/postgres
- While postgres is running, perform migrations
make migrate
npm install -g grunt
npm install -g grunt-cli
- Open new shell and start the web server:
grunt
- Go to http://local.esl.com:3009
- Install nvm from here.
nvm install 0.10.30
nvm use 0.10.30
- Add
source ~/.nvm/nvm.sh
to your ~/.profile (load nvm when you open a shell) - Add
nvm use 0.10.30
to your ~/.profile (load the correct version of Node automatically when you open a shell)
- brew install postgres
- npm install
- postgres -D /usr/local/var/postgres
- In psql,
create database esl_development;
- In a new shell, start psql
psql --username=<USERNAME> -d template1
// use unix username - In psql,
create database <USERNAME>;
// use unix username
to decrypt and setup config files run make setup
(ask someone for key)
to edit config:
- modify
config/{config_name}_template.json
- run
make encrypt CONFIG_NAME={config_name}
using the same key
make migrate
// migrate the database
make rollback
./node_modules/sequelize-cli/bin/sequelize migration:create --name <TABLE_NAME>
drop database esl_development;
create database esl_development;
var models = require('./models');
models.users.create({facebook_id: '12345'}).complete(function(err, user) { ... });
- npm install
nvm use 0.10.30
- Open new shell and start postgres:
postgres -D /usr/local/var/postgres
- Open new shell and start the web server:
grunt
- go to
http://localhost:3009