Skip to content

Latest commit

 

History

History
40 lines (31 loc) · 1.63 KB

README.md

File metadata and controls

40 lines (31 loc) · 1.63 KB

Mister X

Play a game of Scotland Yard with your friends using public transport.

image

Setup

Requirements:

To be able to use the TRIAS API, you need an API Token which you can put into a file called robusta/.env with the following structure:

TRIAS_API_ENDPOINT=YOUR_API_ENDPOINT
TRIAS_ACCESS_TOKEN=YOUR_TOKEN

Configuration

Robusta

Robusta can be configured via environment variables or by using a .env file.

Options:

  • TRIAS_API_ENDPOINT
  • TRIAS_ACCESS_TOKEN
  • NO_FETCH_TRAINS: when this is set, no train data is fetched (in particular, TRIAS_API_ENDPOINT and TRIAS_ACCESS_TOKEN are not needed)
  • PORT: the port (default: 3000)

Portability

If you are not in Karlsruhe, but want to use the app, you have to change some stuff:

  • The map center: update CENTER in liberica/src/components/map/Map.tsx
  • The list of stops: update STOPS in robusta/src/kvv.rs
  • Points for route interpolation: update robusta/data/route_curves.csv (optional)

Development

For development first navigate into the robusta directory and execute the cargo run command. Then after that has completed and a server is hosted, navigate to the liberica directory in a new terminal and execute npm run dev. This should give you a URL to the live server which you can use for local development.

Deployment

For deployment simply execute cargo run and proxy the https connection using something like nginx. The frontend will be hosted by the rust server as well.