aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md24
-rw-r--r--main.go2
2 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index e69de29..72857cf 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/main.go b/main.go
index 7ee8a84..9e3440a 100644
--- a/main.go
+++ b/main.go
@@ -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();