[Unit]
Description=YourPart Backend Server
After=network.target mysql.service redis-server.service
Wants=mysql.service redis-server.service

[Service]
Type=simple
User=www-data
Group=www-data
WorkingDirectory=/opt/yourpart/backend
Environment=NODE_ENV=production
Environment=PORT=2020
ExecStart=/usr/bin/node server.js
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
SyslogIdentifier=yourpart-backend

[Install]
WantedBy=multi-user.target
