LanTimerApp: A way for timing and cycling through different devices for your table games in your local network
This template project provides a way for timing and cycling through phones on your table games on a LAN. Adapt it on for your own projects.
If you are using yarn, install the required packages with the lockfile
yarn
If you are using npm:
npm install
- Start by modifying the
public/index
, adding the server's local ip.
hostname -I | awk '{print $1}'
then change the following line
window.onload=()=>{
// socket handler
server_ip_lan="10.1.211.85" // <- paste here your server's ip
socket=io.connect(server_ip_lan+":8080",{reconnection: false})
- Once you're done, start the server
node main.js
you should get this prompt depending on your selected port:
-
To add the playing devices (phones, computers or anything that has access to an internet browser and your local network), access the server's ip through your browser's the search bar, for example
http://10.1.211.85:8080/
. -
Once all the devices have entered to the network, set their ids in your preferred order (starting from 0) followed by the enter keystroke (so the server assigns each socket with its respective id).
-
Now, you're ready to start the cycle! make sure to press NEXT when you're done with your turn, so other players don't get bored waiting for the clock to finish.
MIT