]> git.codecow.com Git - nano-pow.git/commitdiff
Update sample systemd service for server.
authorChris Duncan <chris@codecow.com>
Sat, 25 Jul 2026 06:26:22 +0000 (23:26 -0700)
committerChris Duncan <chris@codecow.com>
Sat, 25 Jul 2026 06:26:22 +0000 (23:26 -0700)
docs/nano-pow.service

index bb438cd189154e6003b3006691f3d77073646e09..acd4d9f3ae63d6c552eb94dfc7fa64468a4e7254 100644 (file)
@@ -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