File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,18 +4,25 @@ This is the repo for the JavaScript.com website.
44
55## Installing NVM
66
7- - Install NVM (` $ brew install nvm ` and follow instructions)
8- - ` $ nvm install iojs-v1.2.0 `
9- - ` $ nvm use iojs-v1.2.0 `
7+ Install NVM (` $ brew install nvm ` and follow instructions)
8+
9+ ``` bash
10+ nvm install iojs-v1.2.0
11+ nvm use iojs-v1.2.0
12+ npm install -g gulp
13+ npm install
14+ ```
15+
16+ This app authenticates with GitHub, so you'll need to create a GitHub Application and set ENVs for ` GH_CLIENT_ID ` and ` GH_CLIENT_SECRET ` .
1017
1118## Running
1219
13- * Install dependencies with ` $ npm install ` .
14- * Create the local PostgreSQL database with ` $ createdb javascriptcom ` .
15- * Load schema with ` $ psql javascriptcom < db/schema.sql `
16- * This app authenticates with GitHub, so you'll need to create a GitHub Application and set ENVs for ` GH_CLIENT_ID ` and ` GH_CLIENT_SECRET ` .
17- * Run the application with ` $ npm start ` .
18- * Compile and watch Sass with ` $ gulp ` .
20+ Run the application with ` $ npm start ` . You can also set the environment variables at start time. Here's an example:
21+
22+ ``` bash
23+ $ GH_CLIENT_ID=myid GH_CLIENT_SECRET=mysecret npm start
24+ ```
25+ Compile and watch Sass with ` $ gulp ` .
1926
2027For debugging all the things, run ` DEBUG=* npm start ` .
2128
Original file line number Diff line number Diff line change 1+ # How do we only run this if the javascriptcom database doesn't exist?
2+
3+ if psql javascriptcom -c ' \q' 2>&1
4+ then
5+ # The database exists
6+ echo " javascriptcom database already loaded"
7+ else
8+ createdb javascriptcom
9+ psql javascriptcom < db/schema.sql
10+ fi
11+
Original file line number Diff line number Diff line change 66 "iojs" : " 1.2.0"
77 },
88 "scripts" : {
9- "start" : " node --harmony_object_literals ./bin/www"
9+ "start" : " node --harmony_object_literals ./bin/www" ,
10+ "postinstall" : " ./db/setup.sh"
1011 },
1112 "dependencies" : {
1213 "body-parser" : " ~1.10.2" ,
You can’t perform that action at this time.
0 commit comments