Skip to content

Commit

Permalink
update dev installation guide
Browse files Browse the repository at this point in the history
  • Loading branch information
WestleyArgentum committed Jul 31, 2016
1 parent 492bf2d commit e30df5e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

BuzzBot is an experiment, designed to help journalists connect with people on the ground at events. It acts as a Facebook Messenger bot plus a dashboard that journalists can use to send messages to groups of users and view aggregated responses.

### Jump to
### Jump to:

- [Overview](./docs/overview.md)
- [Architecture](./docs/architecture.md)
Expand Down
12 changes: 6 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
1. `git clone git@github.com:buzzfeed-openlab/buzzbot.git && cd buzzbot`
2. `npm install`
3. `cp sample-config.js config.js` (we'll customize this more later)
4. `cp db/sample_sequelize_config.js db/sequelize_config.js` (we'll customize this more later)

### Create a database

Expand All @@ -25,11 +24,11 @@

### Config and run

1. Change `pageToken` in `./config.js` to the token for your Facebook page
2. Change `verifyToken` in `./config.js` to a secret string that only your app and Facebook will know (I recommend generating a UUID or something similar)
1. `export FB_PAGE_TOKEN=XXX` using the token for your Facebook page
2. `export VERIFY_TOKEN=XXX` using a secret string that only your app and Facebook will know (I recommend generating a UUID or something similar)
3. Make sure the user and database inside `./db/sequelize_config.js` match the user and database you created
4. `npm run db:init` (Creates fixtures and populates db. Done only once, manually! Don't add to docker script.)
5. `npm run init` (Webpack build, needs to be run during every build. Should be added to docker script.)
4. `npm run db:init` (Creates fixtures and populates db. Done only once, manually!)
5. `npm run init` (Webpack build. While developing this will be done automatically whenever the client code changes, but in production this needs to be run for every build.)
6. `npm start`

### Verify Facebook webhook
Expand All @@ -49,11 +48,12 @@
## Overview of npm commands

- `npm start`: Run buzzbot
- `npm run init`: Do a Webpack build of the admin dashboard code.
- `npm run db:nuke`: Drop all tables and data in the db
- `npm run db:init`: Initialize db using the models in `./db/models` and create fixtures specified in `./db/fixtures`
- `npm run migrate`: Run all migrations
- `npm run migration:create`: Create a new migration
- `npm run migration:undo`: Undo just the last migration
- `npm run migration:undo:all`: Undo all migrations

Note that there are commands for creating and running migrations, but that the existing migrations are no longer used. All models and relations are created using `sequelize.sync()`. See [here](https://stackoverflow.com/questions/21105748/sequelize-js-how-to-use-migrations-and-sync) for how that could change, unfortunately I have not had time to do it all by hand.
Note that there are commands for creating and running migrations, but that the existing migrations are no longer used. All models and relations are created using `sequelize.sync()`. See [here](https://stackoverflow.com/questions/21105748/sequelize-js-how-to-use-migrations-and-sync) for how that could change, but it hasn't happened yet.

0 comments on commit e30df5e

Please sign in to comment.