This is an online-enabled version of Tiến lên ("Thirteen").
The server component is built in Golang, and the UI is built in TypeScript using the VueJS reactive framework.
Docker builds of master are available on DockerHub. To run the game:
$ docker pull ishkanan/tienlen:latest
$ docker run ishkanan/tienlen:latest -p 26000:26000Or you can run the image using your favourite orchestration tool (e.g. docker-compose).
The game will be available at http://localhost:26000 and other IPs the host has been assigned.
To build the game using the Dockerfile, simply do:
$ docker build -t <your repo>:<your tag> . --force-rmTo build and run the game directly, do the following:
-
Set up a Golang environment
-
Set up an NPM environment
-
Clone this repository into
<Go path>/src/github.com/ishkanan/tienlen -
Run the following commands:
$ cd api
$ go build -o ../tienlen-server main.go
$ cd ../ui
$ npm ci // first run only
$ npm run build- And finally, start the game:
$ cd ..
$ ./tienlen-server -addr "0.0.0.0:26000" -ui "ui/dist"The game will be available at http://localhost:26000 and other IPs the host has been assigned.
As mentioned in the Manual build and run section, ensure you have your Golang and NPM environments set up, and that you've cloned this repository to <Go path>/src/github.com/ishkanan/tienlen.
To run the API server in development mode:
$ cd api
$ go run main.goTo run the UI in development mode, we use the built-in Webpack DevServer:
$ cd ui
$ npm ci // first run only
$ npm run devThe game will be available at http://localhost:26000, with the UI server proxying the API requests.
Feel free to submit PRs for changes, or fork to your heart's content.