qchateau / space-dodgems

A web-based mini game in C++20, featuring coroutines.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Space Dodgems

This is a mini-game created with boost.beast, C++20 coroutines and websockets.

I want to play

How to run

Release environment

The backend server comes pre-built in the image

docker-compose up -d

Dev environment

Sources are mounted and the backend is built on every backend restart.

docker-compose -f docker-compose.yml -f docker-compose-dev.yml up -d

Use behind a reverse-proxy

Here is a sample of the location blocks you can add to an nginx server to use space-dodgems behind nginx acting as a reverse-proxy.

Note that it works for both HTTP and HTTPS.

server {
        ...

        location = /space-dodgems {
                return 302 /space-dodgems/;
        }

        location /space-dodgems {
                proxy_pass http://127.0.0.1:8080/;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }

        ...
}

About

A web-based mini game in C++20, featuring coroutines.

License:MIT License


Languages

Language:C++ 55.8%Language:JavaScript 33.0%Language:CSS 3.8%Language:HTML 3.1%Language:CMake 2.5%Language:Dockerfile 1.3%Language:Shell 0.4%