Awesome
Hooligram Server
System setup (Ubuntu 18)
Go
sudo apt install wget git
wget -q https://storage.googleapis.com/golang/getgo/installer_linux
chmod +x installer_linux
./installer_linux
go version
go get github.com/hooligram/hooligram-server
cd ~/go/src/github.com/hooligram/hooligram-server
export PORT=8080
export TWILIO_API_KEY=<twilio-verify-api-key>
- Verify
export MYSQL_DB_NAME=hooligram
export MYSQL_USERNAME=<username>
export MYSQL_PASSWORD=<password>
govendor build
./hooligram-server
MySQL DB
sudo apt update
sudo apt install mysql-server
sudo systemctl status mysql
- Make sure the Active status is active (running)
sudo mysql
CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON hooligram.* TO '<username>'@'localhost' IDENTIFIED BY '<password>';
CREATE DATABASE hooligram;
Deployment
AWS EC2
- Setup AWS EC2 instance (Ubuntu 18)
- Copy
hooligram-developer.pem
to project root
export IP_ADDR=<aws-ec2-ip-address>
./deploy.sh
Heroku
git push heroku master
Logging
journalctl --pager-end --unit hooligram.service
Test
go test ./...