Skip to content

Commit 031705f

Browse files
iateadonutdaesu
authored andcommitted
instructions improvements
Signed-off-by: dan <[email protected]>
1 parent 61fe7b3 commit 031705f

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11

2+
### Environmental variables for local development ###
3+
.env
4+
25
### Code ###
36
# Visual Studio Code - https://code.visualstudio.com/
47
.settings/
@@ -159,4 +162,4 @@ vendor
159162
# Terraform plugins
160163
.terraform
161164

162-
.env
165+
.env

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,20 @@ Please see [database doc](db/README.md).
1919
## Swagger
2020
Documentation is available at `/api/docs`.
2121

22-
Also see [swagger doc](swagger/ledger.yaml).
22+
Also see [swagger doc](swagger/ledger.yaml).
23+
24+
## Set Up Local Dev Instance
25+
26+
in $GOPATH/src/github.com, git clone this package to /communitybridge/ledger. You must be working from $GOPATH/src/github.com/communitybridge/ledger
27+
28+
cp .env-example to .env and edit with the correct values
29+
30+
- source .env
31+
- make setup_dev
32+
- make up
33+
- make build
34+
- make run
35+
36+
Then go to: http://localhost:8080/api/health to test the simplest endpoint.
37+
38+
Find more endpoints at http://localhost:8080/api/docs created by swagger/ledger.yaml

db/README.md

+6-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,16 @@ Apply schema
1212
## Seeding
1313
Some seed data for testing exists in `db/seed.sql`.
1414

15-
Ensure test database environment variables are set. Namely;
15+
Ensure test database environment variables are set. Namely:
1616

1717
```bash
1818
DATABASE_HOST
1919
DATABASE_PASSWORD
2020
DATABASE_USERNAME
2121
DATABASE_NAME
2222
DATABASE_URL="postgresql://$DATABASE_USERNAME:$DATABASE_PASSWORD@$DATABASE_HOST/$DATABASE_NAME?sslmode=disable" // required by dbmate
23-
```
23+
```
24+
25+
An example .env file is in the root directory. Copy that to .env and put in your own variables.
26+
27+
Then run `source .env` before running dbmate or the make file, etc

0 commit comments

Comments
 (0)