Tools:
Install tailwindcss standalone-cli and make sure it's in your executables path, for example:
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/download/v4.0.0/tailwindcss-macos-arm64
chmod +x tailwindcss-macos-arm64
mv tailwindcss-macos-arm64 ~/bin/tailwindcss
- Prettier plugin for tailwindcss (optional):
npm install -D prettier prettier-plugin-tailwindcss
Build and Run:
- Set env variables, defaults are
# if `NONCE_GUESS_DB_FILE` not set the data is stored in temporary file. export NONCE_GUESS_DB_FILE=/data/nonce_guess.redb export NONCE_GUESS_MEMPOOL_URL=/data/nonce_guess.redb
- Start the server, it will also serve the latest web client
RUST_LOG=debug cargo run
- Build the server binary, this will include the web artifacts
cargo build --release
To run the resulting self-contained binary use RUST_LOG=debug target/release/ng_server
.
In test or release mode the web client can be found at: http://localhost:8081/
docker build -t nonce_guess .
docker run -d --rm -it -p 8081:8081 -v nonce_vol:/data --name nonce_guess_app nonce_guess
- Visit http://localhost:8081/ in a browser
Note: on linux above steps also work with podman
instead of docker
.