A simple TicTacToe app with Golang backend and WebSockets gluing it all together.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
987 B

  1. # TicTacToe API Interface
  2. A Golang Server that opens a unique socket for two users to play TicTacToe online.
  3. ## Firewall
  4. sudo ufw status
  5. sudo ufw allow OpenSSH
  6. sudo ufw allow https
  7. sudo ufw enable
  8. ## Install Go
  9. curl -C - https://dl.google.com/go/go1.11.4.linux-amd64.tar.gz -o go1.11.4.linux-amd64.tar.gz
  10. tar -C /usr/local -xzf go1.11.4.linux-amd64.tar.gz
  11. echo "export PATH=$PATH:/usr/local/go/bin"
  12. go version
  13. ## Letsencrypt
  14. sudo add-apt-repository ppa:certbot/certbot
  15. sudo apt-get update
  16. sudo apt-get install python-certbot-nginx
  17. certbot certonly --standalone -d weather.l3vi.co
  18. ## Systemd
  19. sudo cp tictactoe-api.service /lib/systemd/system/.
  20. ls -al /lib/systemd/system
  21. sudo chmod 755 /lib/systemd/system/tictactoe-api.service
  22. sudo systemctl enable tictactoe-api.service
  23. sudo systemctl start tictactoe-api.service
  24. sudo journalctl -f -u tictactoe-api
  25. # or
  26. sudo systemctl status tictactoe-api.service