File tree 3 files changed +27
-4
lines changed
3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 1
1
2
+ # ## Environmental variables for local development ###
3
+ .env
4
+
2
5
# ## Code ###
3
6
# Visual Studio Code - https://code.visualstudio.com/
4
7
.settings /
@@ -159,4 +162,4 @@ vendor
159
162
# Terraform plugins
160
163
.terraform
161
164
162
- .env
165
+ .env
Original file line number Diff line number Diff line change @@ -19,4 +19,20 @@ Please see [database doc](db/README.md).
19
19
## Swagger
20
20
Documentation is available at ` /api/docs ` .
21
21
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
Original file line number Diff line number Diff line change @@ -12,12 +12,16 @@ Apply schema
12
12
## Seeding
13
13
Some seed data for testing exists in ` db/seed.sql ` .
14
14
15
- Ensure test database environment variables are set. Namely;
15
+ Ensure test database environment variables are set. Namely:
16
16
17
17
``` bash
18
18
DATABASE_HOST
19
19
DATABASE_PASSWORD
20
20
DATABASE_USERNAME
21
21
DATABASE_NAME
22
22
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
You can’t perform that action at this time.
0 commit comments