# /etc/systemd/system/wbot-server.service[Unit]Description=Wordsmith web server
After=network.target nss-lookup.target
[Service]Type=simple
User=wordsmith
Group=wordsmith
ExecStart=/usr/local/bin/wbot-server
Restart=on-failure
RestartSec=5
[Install]WantedBy=multi-user.target
Example nginx config
# /etc/nginx/sites-available/wbotserver {
listen80;
server_name WBot;
root /var/www/static;
location/ {
# First attempt to serve request as file, then# as directory, then fall back to displaying a 404.try_files$uri$uri/ =404;
}
location/api/ {
# Pass along to wbot-server on port 8080proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://127.0.0.1:8080/;
}
}