From: Chris Duncan Date: Sat, 25 Jul 2026 06:26:22 +0000 (-0700) Subject: Update sample systemd service for server. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=c012bbd55ad48aeb8e9e0166ca2decd648ab0ce4;p=nano-pow.git Update sample systemd service for server. --- diff --git a/docs/nano-pow.service b/docs/nano-pow.service index bb438cd..acd4d9f 100644 --- a/docs/nano-pow.service +++ b/docs/nano-pow.service @@ -9,14 +9,21 @@ [Unit] Description=NanoPow Server -[Service] -# Must point at install path, often in `npm_config_prefix` directory: -WorkingDirectory=%h/.local/lib/node_modules/nano-pow +[Install] +WantedBy=default.target +[Service] Type=simple ExecStart=/usr/bin/npm start EnvironmentFile=-%h/.nano-pow/config PassEnvironment=NANO_POW_DEBUG NANO_POW_EFFORT NANO_POW_PORT +StandardOutput=journal +StandardError=journal -[Install] -WantedBy=default.target +## Path must point at the nano-pow package in the global npm installation +## directory. This is usually defined as the `npm_config_prefix` directory and +## can be discovered using `npm -g prefix`. Append "/lib/node_modules/nano-pow" +## to this path; if it's in your home directory, replace that with "%h". A full +## example is as follows: +## +WorkingDirectory=%h/.local/lib/node_modules/nano-pow