***************************************************** GO ********************************************************
- Download and install the go binaries. Version 1.7
- Set $GOROOT to the path where your binaries were installed. (Usualy C:/Go)
- Create a workspace for your Go projects. Ex (C:Documents/CodeProjects/Go)
- Set $GOPATH as the path of the directory you just created (Workspace)
- Set $GOBIN as $GOROOT/bin
- The Go directory you create should have 3 subdirectories labelled src pkg bin.
- Once all this is done make sure to open a new terminal.
- Run go get github.com/Skellyboy38/SOEN-343-NullPointer This will pull our repository.
- cd into C:Documents/CodeProjects/Go/src/github.com/Skellyboy38/SOEN-343-NullPointer/Layers
- To compile go programs you must run go build This will create an executable. In our case run go build controller.go The resulting executable will be controller.exe
- You can now run the executable which is our application.
- If compilation argues that you have missing packages run a go get on those missing packages. Compilation should work once all the depencies have been resolved.
- Alternately go run controller.go will run the application without creating an executable.
- go install controller.go will create an executable in the GOBIN directory we specified earlier.
************************************************ DATABASE SETUP *************************************************
- Download and Install Postgres version 9.7
- Change directory until data_source_layer/setup is your working directory.
- Run bash dbSetup.sh This will create a soen343 user which we will use in our application. It will initialise the database and create its directory called registry in the current working directory. (data_source_layer/setup). It will run the database server. It will create the tables we are using and populate the users table with hardcoded users. The database seems to close everytime the application is closed or stops running. Therefore before everytime you run the application you must first start the database server with pg_ctl.exe -D registry start. Once again in the same directory as before.