nano-pow 5.0.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ NANO_POW_LOGS="$NANO_POW_HOME"/logs;
10
10
  mkdir -p "$NANO_POW_LOGS";
11
11
  if [ "$1" = '--server' ]; then
12
12
  shift;
13
- node --max-http-header-size=1024 --max-old-space-size=256 "$SCRIPT_DIR"/server.js >> "$NANO_POW_LOGS"/nano-pow-server-$(date -I).log 2>&1 &
13
+ npm start >> "$NANO_POW_LOGS"/nano-pow-server-$(date -I).log 2>&1 &
14
14
  sleep 1;
15
15
  if [ "$(ps | grep $(cat $NANO_POW_HOME/server.pid))" = '' ]; then
16
16
  cat $(ls -td "$NANO_POW_LOGS"/* | head -n1);
@@ -3,7 +3,7 @@
3
3
 
4
4
  ## Example systemd service unit file to start the nano-pow server at login.
5
5
  ## Run `systemctl --user edit --force --full nano-pow.service`
6
- ## Copy contents below into editor, modifying ExecStart as needed, and save.
6
+ ## Copy contents below into editor, modify WorkingDirectory as needed, and save.
7
7
  ## Run `systemctl --user enable nano-pow --now` to start it now and at boot.
8
8
 
9
9
  [Unit]
@@ -11,15 +11,12 @@ Description=NanoPow Server
11
11
 
12
12
  [Service]
13
13
  # Must point at install path, often in `npm_config_prefix` directory:
14
- ExecStart=%h/.local/bin/nano-pow --server
14
+ WorkingDirectory=%h/.local/lib/node_modules/nano-pow
15
15
 
16
- Type=forking
17
- WorkingDirectory=%h
16
+ Type=simple
17
+ ExecStart=/usr/bin/npm start
18
18
  EnvironmentFile=-%h/.nano-pow/config
19
19
  PassEnvironment=NANO_POW_DEBUG NANO_POW_EFFORT NANO_POW_PORT
20
- PIDFile=%h/.nano-pow/server.pid
21
- StandardOutput=journal+console
22
- StandardError=journal+console
23
20
 
24
21
  [Install]
25
22
  WantedBy=default.target
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nano-pow",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Proof-of-work generation and validation with WebGPU/WebGL/WASM for Nano cryptocurrency.",
5
5
  "keywords": [
6
6
  "nemo",
@@ -55,7 +55,7 @@
55
55
  "gpugenerate": "cd src/lib/generate/webgpu/shaders && rm -rf build && tsc && node build/generate.js > build/compute.wgsl && cp tsconfig.json* build",
56
56
  "prepare": "npm run build",
57
57
  "score": "npm run build && ./dist/bin/nano-pow.sh --effort 4 --benchmark 100 --score 100",
58
- "start": "./dist/bin/nano-pow.sh --server",
58
+ "start": "node --max-http-header-size=1024 --max-old-space-size=256 ./dist/bin/server.js",
59
59
  "test": "npm run build && ./test/script.sh"
60
60
  },
61
61
  "devDependencies": {