/etc/systemd/system/iplog.service:
[Unit]
Description=Node.js alibIP server
Requires=After=mysql.service # Requires the mysql service to run first
[Service]
ExecStartPre=/usr/bin/npm run email-build
ExecStart=/usr/bin/node /var/www/alibip/app.js
Restart=always
SyslogIdentifier=NodejsAlibIP
User=www-data
Group=www-data
Environment=NODE_ENV=production
Environment=SERVER_PORT=3003
Environment=SERVER_IFACE=127.0.0.1
WorkingDirectory=/var/www/alibip
UMask=007
[Install]
WantedBy=multi-user.target
add_header Strict-Transport-Security "max-age=63072000; ";
add_header X-Frame-Options "DENY";
add_header X-Content-Type-Options "nosniff";
add_header Content-Security-Policy "default-src https: 'unsafe-inline'; frame-ancestors 'none'; style-src 'self' https://netdna.bootstrapcdn.com/; script-src 'self' 'unsafe-inline' https://stat.myocastor.de/ https://code.jquery.com/ https://netdna.bootstrapcdn.com/";
Created with Nodeclipse (Eclipse Marketplace, site)
Nodeclipse is free open-source project that grows with your contributions.