Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

Change baseDir and envFile #29

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ CREATE DATABASE fin4 default charset utf8;
```
Assign a user full access right to the fin4 database (or leave it with root).

```SQL
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password1';
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
FLUSH PRIVILEGES;
```

## Env variables
Copy .env_sample file to .env.
Then, modify the following entries:
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func main() {
environment := strings.ToLower(env.MustGetenv("ENVIRONMENT"))

//TODO this should be changed ASAP
baseDir := "$GOPATH/src/github.com/FuturICT2/fin4-core"
baseDir := "$GOPATH/fin4-core"
env.Load(baseDir, false)

cfg := datatype.Config{
Expand Down
2 changes: 1 addition & 1 deletion server/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func Load(baseDir string, isTesting bool) {
if isTesting {
envFile = "env-test"
} else {
envFile = "env-default"
envFile = ".env" //"env-default"
}

err := godotenv.Load(os.ExpandEnv(
Expand Down