/rsocket-demo-post

Lottery Game application for RSocket Post.

Primary LanguageTypeScript

Lottery Game with RSocket

Lottery Game application made with ❤️ and RSocket

Description

This project is based on two modules:

  1. Lottery RSocket Client. It's an Angular application. It's in charge of requesting the numbers from the server and representing them on the website.

  2. Lottery RSocket Server. It's an Spring Boot application. It's in charge of communicating with the client, for the generation and transmission of the winning lottery numbers.

Run the application (with Docker)

To run the application, you can use Docker. The docker-compose.yml file contains the two services above.

Execute the following command to launch the game:

docker-compose up -d

Once the services are up, you can access the game by entering the following URL in the browser: http://localhost:80

Game configuration

The server application allows some configuration by the user. You can configure the range of numbers for the raffle, both the main numbers and the special numbers. To do that, you should use the following environment variables in the lottery-server service.

environment:
- LOTTERY_NUMBERS_MAIN_MIN = 1
- LOTTERY_NUMBERS_MAIN_MAX = 50
- LOTTERY_NUMBERS_SPECIAL_MIN = 1
- LOTTERY_NUMBERS_SPECIAL_MAX = 12