systemd
This commit is contained in:
parent
aea34a1d5c
commit
48701890df
21
README.md
21
README.md
|
@ -1,10 +1,27 @@
|
|||
# Defcon!!!
|
||||
# OpenFest Timer
|
||||
|
||||
## Deployment
|
||||
|
||||
Clone to `/opt/timer`.
|
||||
Put `openfest-timer@.service` in `/etc/systemd/system`.
|
||||
Requires NodeJS and npm.
|
||||
|
||||
```bash
|
||||
systemctl daemon-reload
|
||||
npm install
|
||||
systemctl enable --now openfest-timer@hall-a.service
|
||||
systemctl enable --now openfest-timer@hall-b.service
|
||||
```
|
||||
|
||||
## 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?
|
||||
### 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](http://robdodson.me)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
HOST=127.0.0.1
|
||||
PORT=5050
|
||||
TITLE=HALL-A
|
||||
NODE_ENV=production
|
|
@ -0,0 +1,4 @@
|
|||
HOST=127.0.0.1
|
||||
PORT=5051
|
||||
TITLE=HALL-B
|
||||
NODE_ENV=production
|
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=OpenFest Timer (%i)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
EnvironmentFile=/opt/timer/%i.env
|
||||
Type=simple
|
||||
Restart=on-failure
|
||||
WorkingDirectory=/opt/timer
|
||||
ExecStart=/usr/bin/env node app.js
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue