https://github.com/hooligram/hooligram-server
Hooligram backend by Hooli rooftop engineers!
https://github.com/hooligram/hooligram-server
chat golang mysql server websocket
Last synced: 14 days ago
JSON representation
Hooligram backend by Hooli rooftop engineers!
- Host: GitHub
- URL: https://github.com/hooligram/hooligram-server
- Owner: hooligram
- Created: 2019-01-14T22:35:06.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2019-09-24T14:44:19.000Z (over 6 years ago)
- Last Synced: 2024-06-20T14:29:10.216Z (over 1 year ago)
- Topics: chat, golang, mysql, server, websocket
- Language: Go
- Homepage: https://github.com/hooligram/hooligram-docs
- Size: 5.75 MB
- Stars: 15
- Watchers: 3
- Forks: 8
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Hooligram Server
[](https://travis-ci.com/hooligram/hooligram-server)
## System setup (Ubuntu 18)
### Go
1. `sudo apt install wget git`
2. `wget -q https://storage.googleapis.com/golang/getgo/installer_linux`
3. `chmod +x installer_linux`
4. `./installer_linux`
5. `go version`
6. `go get github.com/hooligram/hooligram-server`
7. `cd ~/go/src/github.com/hooligram/hooligram-server`
8. `export PORT=8080`
9. `export TWILIO_API_KEY=` - [Verify](https://www.twilio.com/verify)
10. `export MYSQL_DB_NAME=hooligram`
11. `export MYSQL_USERNAME=`
12. `export MYSQL_PASSWORD=`
13. `govendor build`
14. `./hooligram-server`
### MySQL DB
1. `sudo apt update`
2. `sudo apt install mysql-server`
3. `sudo systemctl status mysql` - Make sure the *Active* status is *active (running)*
4. `sudo mysql`
5. `CREATE USER ''@'localhost' IDENTIFIED BY '';`
6. `GRANT ALL PRIVILEGES ON hooligram.* TO ''@'localhost' IDENTIFIED BY '';`
7. `CREATE DATABASE hooligram;`
## Deployment
### AWS EC2
1. Setup AWS EC2 instance (Ubuntu 18)
2. Copy `hooligram-developer.pem` to project *root*
3. `export IP_ADDR=`
4. `./deploy.sh`
### Heroku
1. `git push heroku master`
## Logging
1. `journalctl --pager-end --unit hooligram.service`
## Test
1. `go test ./...`