An example Node.js, Express.js and Socket.io project showing how to build a stopwatch.
Go to file
Tocho Tochev 1026d71f3a Add multi-site docker configuration 2024-10-27 14:47:03 +02:00
models Upgrade for newer node versions 2023-10-25 20:42:51 +03:00
public Add multi-site docker configuration 2024-10-27 14:47:03 +02:00
views Add multi-site docker configuration 2024-10-27 14:47:03 +02:00
.gitignore Upgrade for newer node versions 2023-10-25 20:42:51 +03:00
Dockerfile Add multi-site docker configuration 2024-10-27 14:47:03 +02:00
README.md Add multi-site docker configuration 2024-10-27 14:47:03 +02:00
app.js Add multi-site docker configuration 2024-10-27 14:47:03 +02:00
docker-compose.yml Add multi-site docker configuration 2024-10-27 14:47:03 +02:00
hall-a.env systemd 2023-10-26 07:58:37 +03:00
hall-b.env systemd 2023-10-26 07:58:37 +03:00
package.json Add multi-site docker configuration 2024-10-27 14:47:03 +02:00

README.md

OpenFest Timer

Deployment

Configuration

Configuration is done by environmental variables:

HALLS: "/hall-a:Hall A;/hall-b:Hall B"
TITLE: "Hall A"  # not in use if HALLS is set to non-empty
PREFIX: /hall-a  # not in use if HALLS is set to non-empty
BASIC_AUTH: "admin:password"  # user:plaintext-password

Prod Deployment

cd timer-repo/
git pull
podman build -t timer .

Local Development

docker-compose up --build

Based on Defcon

Defcon

Defcon is a stopwatch running on Node.js, Express.js, and Socket.io. It is intended to be a good starting point if you're just learning to use web sockets. It currently uses xhr-polling so it is compatible with Heroku.

Who's it for?

I originally wrote Defcon over four blog posts introducing Socket.io and deploying to Heroku. Please checkout the posts on my site, robdodson.me