Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Update readme with deployment instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
sjone4 committed May 12, 2016
1 parent f131353 commit 72c91f9
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Before taking any steps you need to get a BOT API KEY from the Slack intergratio
* Create a user by running `CREATE ROLE "name" WITH LOGIN PASSWORD "password";`
* run `\du` to check if the role is there.
* `\q` to exit current database.
* run `psql dbName userName -h localhost` to enter cli for you new db
* run `psql dbName userName -h localhost` to enter cli for your new db
* run `CREATE TABLE movies ( id SERIAL, title varchar(80), votes int);` to create a table with the specified structure

4.) Run Bot
Expand All @@ -31,3 +31,20 @@ Before taking any steps you need to get a BOT API KEY from the Slack intergratio
* run `postgres -D /usr/local/var/postgres`
* run `npm start`

## Deploying
* Deploying on Heroku is easy
* Check to ensure that you have Postgresql by running `heroku pg:info`

1) Setting up your Heroku pg database
* Establish a database by running `heroku addons:create heroku-postgresql:hobby-dev`
* Where `hobby-dev` is the plan name. For our purposes we'll use the free hobby dev plan
* You will see something like `HEROKU_POSTGRESQL_COLOR_URL`. This is the alias for the URL of your database
* Run `heroku pg:psql`
* YOU MUST HAVE POSTGRESQL INSTALLED TO USE `heroku pg:psql`
* This will establish a connection to your Heroku pg database
2) Creating your database
* From there, you will see a psql instance. Run your table commands here
* For this project, `CREATE TABLE movies (id SERIAL, title VARCHAR(35), votes INT);` will create the same database
3) Ensure your config variables match
* Ensure that your heroku database URL and Slack API keys match up in your Heroku app dashboard
4) Have fun

0 comments on commit 72c91f9

Please sign in to comment.