Skip to content

Snake Game webserver written in Erlang using cowboy as webserver. It utilizes deployex for handling and managing the app

License

Notifications You must be signed in to change notification settings

thiagoesteves/erlgame

Repository files navigation

github workflow Erlant/OTP Release

Game webserver written in Erlang

Erlgame

The app is an example of how Erlang can be used to be part of the Game backend as a server for a single player or multiple players. In this code you will find examples of how to use cowboy webserver, gen_statem (and how to recover from a crash), supervision tree using simple_one_for_one, aws terraform to deploy, common tests, gun to test webserver, etc.

Getting started

You need to clone the repository and download rebar3 (if it's not already available in your path).

git clone https://github.com/thiagoesteves/erlgame.git
cd erlgame

To compile and run

export PORT=4000
make run

Open your web browser, got to http://127.0.0.1:4000/, type your Name and play

Unit Test and coverage

The following command will invoke common test and coverage.

make test

Deploy at AWS Amazon