diff options
author | FChannel <=> | 2021-01-13 19:38:21 -0800 |
---|---|---|
committer | FChannel <=> | 2021-01-13 19:38:21 -0800 |
commit | 09d041e10215adc0a804cf8197133752c75aeebf (patch) | |
tree | 4369853539cb0c62baa13dc7ef294b29f0cabfdd | |
parent | 8fb8ccafa3452d4987098ccef5c1c0bf247db555 (diff) |
added readme info
-rw-r--r-- | README.md | 24 | ||||
-rw-r--r-- | main.go | 2 |
2 files changed, 25 insertions, 1 deletions
@@ -0,0 +1,24 @@ +Setup: + +Install golang + +Set these enviroment variables: +export GOROOT=/usr/lib/go +export GOPATH=$HOME/.local/go //or where ever you have you go src dir +export PATH="$PATH:$GOPATH/bin" + +run +go get github.com/lib/pq //database + +create a database and user with psql and run +psql -U (user) -d (database) -f databaseschema.psql + +set db user, password, name in main.go +set the Domain variable to the domain name that identifies this instance + +run +go run . + +One up and running query the database with +select * from boardaccess; +To be able to get your administrative credentials @@ -45,7 +45,7 @@ type BoardAccess struct { func main() { if _, err := os.Stat("./public"); os.IsNotExist(err) { - os.Mkdir("./public", os.ModeDir) + os.Mkdir("./public", 0755) } db := ConnectDB(); |