From: Chris Duncan Date: Fri, 28 Mar 2025 05:28:15 +0000 (-0700) Subject: In README, remove npm prefix example, remove second-person perspective, and add envir... X-Git-Tag: v4.0.10~4 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=396ad0363d8d912d9c89ae010b9792fc0e7e9a94;p=nano-pow.git In README, remove npm prefix example, remove second-person perspective, and add environment variables. --- diff --git a/README.md b/README.md index fb13fb6..0c07fe5 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ https://docs.nano.org/integration-guides/work-generation/#work-calculation-detai ```console $ npm i nano-pow ``` -NanoPow can also be installed globally to add the `nano-pow` command to your -environment. To learn more, see [#Executables](#executables). +NanoPow can also be installed globally to add the `nano-pow` command to the +system environment. To learn more, see [#Executables](#executables). ## Usage ### Import @@ -93,21 +93,16 @@ $ npm -g i nano-pow $ nano-pow --help # view abbreviated CLI help $ man nano-pow # view full manual ``` -Ensure you have proper permissions on your +Ensure proper permissions exist on the [npm `prefix`](https://docs.npmjs.com/cli/v11/commands/npm-prefix) directory and -have configured your `PATH` accordingly. +that `PATH` is also configured accordingly. [nvm](https://github.com/nvm-sh/nvm) +is a great tool that handles this automatically. -For example, this adds a user-specific directory for local binaries to `PATH` -upon login and configures `npm prefix` to use it for global installations: -```console -$ echo 'PATH="$HOME/.local/bin:$PATH"' >> .bashrc -$ npm config set prefix="$HOME/.local" -``` ### Command Line NanoPow provides a shell command—`nano-pow`—to accomodate systems without a graphical user interface. It launches a headless Chrome browser using `puppeteer` to access the required WebGPU or WebGL APIs. Use the `--global` flag -when installing to add the executable script to your system. +when installing to add the executable script to the system. ```console $ npm i -g nano-pow ``` @@ -138,14 +133,17 @@ $ cat /path/to/hashes/file | nano-pow ### Server NanoPow also provides a basic work server similar to the one included in the official Nano node software. The installed command will launch the server in a -detached process, and you can also start it yourself to customize behavior by +detached process, and it can also be started manually to customize behavior by executing the server script directly. -`PORT` can be passed as an environment variable and defaults to 3000 if not -specified. +`NANO_POW_PORT` can be passed as an environment variable and defaults to 3000 if +not specified. `NANO_POW_EFFORT` can also be passed as an environment variable to increase -or decrease the demand on the GPU and defaults to 8 if not specified. +or decrease the demand on the GPU. + +`NANO_POW_DEBUG` can be set to enable additional logging saved to the HOME +directory. ```console $ # Launch the server and detach from the current session @@ -155,7 +153,7 @@ $ cat ~/.nano-pow/server.pid $ # Display list of server logs $ ls ~/.nano-pow/logs/ $ # Find process ID manually -$ ps aux | grep NanoPow +$ pgrep NanoPow ``` Work is generated or validated by sending an HTTP `POST` request to the configured hostname or IP address of the machine. Some basic help is available @@ -226,7 +224,7 @@ GNU GPL version 3 or later Portions of this code are also provided under the MIT License: ## Donations -If you find this package helpful, please consider tipping the developer. +Tips are always appreciated and can be sent to the following developer address: ``` nano_1zosoqs47yt47bnfg7sdf46kj7asn58b7uzm9ek95jw7ccatq37898u1zoso ```