Skip to content

Commit 59a6fcb

Browse files
author
Evan Thomas
committed
Update local development instructions in README
1 parent 34c726e commit 59a6fcb

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
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

migrations/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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`
44
2. then run migration locally
55
* `psql < *MIGRATION_NAME*`
66

7-
# On Heroku:
7+
# On Heroku:
88

99
1. `heroku pg:psql < *MIGRATION_NAME*`

0 commit comments

Comments
 (0)