Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
//get the machine ready
sudo apt-get update
sudo apt-get upgrade
//set up go
sudo apt-get install golang-go
mkdir ~/go
mkdir ~/go/src
export GOPATH=~/go/
//set up postgres
give the postgres user a password in psql
create database as postgres user
create tables as ubuntu user
//set up the project
git clone [...]
go get
//changes to project
db, err = sql.Open("postgres", "postgres://postgres:PASSWORD@localhost/hello-its-me")
file := fileServerDir + r.URL.Path[7:]
fileServerDir = "/home/ubuntu/go/src/hello-its-me/assets"
move the models and templates up one dir
http.ListenAndServeTLS(":8081", "/home/ubuntu/.certs/cert.pem", "/home/ubuntu/.certs/key.pem", nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment