We configure a systemd service unit to start our elm-pages prototype.
⇒ elm-pages-starter-express/package.json code
"start": "node dist-server/server.mjs"
systemd.services.elm-pages = { wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; description = "blog.dreyeck.ch/elm-pages-starter-express"; serviceConfig = { Type = "simple"; User = "rgb"; WorkingDirectory = "/home/rgb/.wiki/blog.dreyeck.ch/elm-pages-starter-express"; ExecStart = "/run/current-system/sw/bin/node dist-server/server.mjs"; Restart = "on-failure"; }; };
nixos-rebuild switch
cd ~/.wiki/blog.dreyeck.ch/elm-pages-starter-express/ ; git pull ; npm run build
systemctl restart elm-pages
~
The ultimate guide to deploying your node app on Linux archive