Setup the Postgresql database.
a. Install postgresql 10
b. Open psql, get it pointed at the default postgres database, and enter the following commands:
CREATE DATABASE shr; -- Creates a new database for the project
CREATE ROLE shrdev; -- Creates a new role for a shr developer
ALTER ROLE shrdev WITH PASSWORD 'asdf'; -- Give them a password
GRANT ALL PRIVILEGES ON DATABASE shr TO shrdev; -- Give them privileges to modify the database
ALTER ROLE shrdev CREATEDB; -- Allow the shrdev role to create
their own databases
ALTER ROLE shrdev WITH LOGIN; -- Allow the shrdev role to login
Build the server.
From command line, run make this will build the project and put a copy of the built server in ./bin named shr.
Alternatively, run mkdir -p ./bin && go build && mv shr ./bin
Build the test client. (Test client isn't done yet...)
From command line, run make test-client. This will also put an executable in ./bin named test-client.
Alternatively run cd test-client; go build; mv ./test-client ../bin; cd ..
Migrate and run the server: ./bin/shr migrate && ./bin/shr startServer.