File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Installation
22## Locally
33* postgres server installed and running
4- * `brew install postgres`
5- * `pg_ctl -D /usr/local/var/postgres start`
6- * heroku cli installed
7- * `brew install heroku`
4+ * ` brew install postgres `
5+ * ` pg_ctl start -D /usr/local/var/postgres `
86* golang installed
9- * `brew install go`
10- * godep installed:
11- * `go get github.com/tools/godep`
7+ * ` brew install go `
8+ * godep installed:
9+ * ` go get github.com/tools/godep `
10+ * create database
11+ * ` psql -d postgres -c "create database cerealnotes_test" `
12+ * Refer to ` migrations/README.md ` to create relevant database tables
13+ * export environment variables
14+ ```
15+ export DATABASE_URL=postgres://localhost:5432/cerealnotes_test?sslmode=disable
16+ export TOKEN_SIGNING_KEY=abcdefg
17+ export PORT=8000
18+ ```
19+ * run the app
20+ * `go build && ./cerealnotes`
1221
1322## Heroku
23+ * heroku cli installed
24+ * `brew install heroku`
1425* heroku instance
15- * instance connected to postgres db
1626
1727# Running CerealNotes
1828
Original file line number Diff line number Diff line change 1- # Locally:
2- 1 . first make sure that postgres is running.
3- * If installed via homebrew on a macOS: `pg_ctl -D /usr/local/var/postgres start `
1+ # Locally:
2+ 1 . first make sure that postgres is running.
3+ * If installed via homebrew on a macOS: `pg_ctl start -D /usr/local/var/postgres`
442 . then run migration locally
55 * `psql < *MIGRATION_NAME*`
66
7- # On Heroku:
7+ # On Heroku:
88
991 . ` heroku pg:psql < *MIGRATION_NAME* `
You can’t perform that action at this time.
0 commit comments