Welcome to VictorSesma.com Go Repository
This is the API end point for the VictorSesma.com React App
- Install Golang (for example:
snap install --classic go
) - Clone the repository (for example:
git clone git@github.com:leviatan89/api.victorsesma.com.git
) - Make a copy and configure conf.json
- Run the migrate comand. Something like: ´migrate -source file:///home/user/go/src/github.com/leviatan89/api.victorsesma.com/migrations -database mysql://"user:password@tcp(dbserver.example:3306)/dbname" up 2`
- Run
go install
- Create the following Unit file:
[Unit]
Description= instance to serve apiVictorSesma
After=network.target
[Service]
Environment=GOPATH=/home/leviatan89/go
User=root
Group=www-data
ExecStart=/home/leviatan89/go/bin/api.victorsesma.com
[Install]
WantedBy=multi-user.target
- Run
sudo systemctl enable apiVictorSesma
** Note that the msyql server should be running as well **