37 lines
863 B
Markdown
37 lines
863 B
Markdown
|
### Installation
|
||
|
|
||
|
Copy ```config.example.js``` to ```config.js``` and review the configuration options. If this is an update, compare your ```config.js``` with ```config.example.js``` to see if anything has been added.
|
||
|
|
||
|
To build the production version:
|
||
|
```bash
|
||
|
npm run build
|
||
|
|
||
|
```
|
||
|
|
||
|
|
||
|
#### Service on Linux (systemd)
|
||
|
/etc/systemd/system/recv.service:
|
||
|
|
||
|
|
||
|
```ini
|
||
|
[Unit]
|
||
|
Description=Recv
|
||
|
|
||
|
[Service]
|
||
|
ExecStart=/usr/bin/node /srv/recv/index.js
|
||
|
WorkingDirectory=/srv/recv
|
||
|
Restart=always
|
||
|
RestartSec=10 # Restart service after 10 seconds if node service crashes
|
||
|
StandardOutput=syslog # Output to syslog
|
||
|
StandardError=syslog # Output to syslog
|
||
|
SyslogIdentifier=recv
|
||
|
User=recv
|
||
|
|
||
|
[Install]
|
||
|
WantedBy=multi-user.target
|
||
|
```
|
||
|
|
||
|
```bash
|
||
|
systemctl enable recv.service
|
||
|
systemctl start recv.service
|
||
|
```
|