Skip to content

Commit c5e90c9

Browse files
author
joeltaylor
committed
Update README with MongoDB and add script
1 parent fe23eac commit c5e90c9

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

README.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,11 @@ $ GH_CLIENT_ID=myid GH_CLIENT_SECRET=mysecret npm start
2626
For debugging all the things, run `DEBUG=* npm start`.
2727

2828
## Database
29-
Whenever you do the initial `npm install` a db called `javascriptcom` is created
30-
for you. In the event that you need to drop that database and recreate it, don't
31-
forget to either run `npm install` again or `createdb javascriptcom`
29+
Download and install [MongoDB](https://www.mongodb.org/downloads)
3230

33-
NPM will run new migrations whenever you `npm start`. In order for it to work,
34-
you'll need to set the `DATABASE_URL` ENV to pg://localhost:5432/javascriptcom.
35-
Migrations are already run for you after the initial `npm install`
31+
When you run `npm start`, mongod will be forked as a background process. No need
32+
to create the database either. You're all set.
3633

37-
To create new migrations see the node-pg-migraton
38-
[documentation](https://github.com/theoephraim/node-pg-migrate).
39-
40-
After setting your database up run `gulp seeds` to seed your database.
4134
## Development
4235

4336
If you add any runtime dependencies, you must run `npm shrinkwrap` and

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
"private": true,
55
"engines": {},
66
"scripts": {
7+
"prestart": "mongod --fork --logpath /dev/null",
78
"start": "node ./bin/www",
9+
"poststop": "mongo admin --eval 'db.shutdownServer()' > /dev/null",
810
"postinstall": "./setup.sh",
911
"bower": "node_modules/.bin/bower",
1012
"gulp": "node_modules/.bin/gulp"

0 commit comments

Comments
 (0)