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:8080/
docker build -t nonce_guess .
docker run -d --rm -it -p 8080:8080 -v nonce_vol:/data --name nonce_guess_app nonce_guess
- Visit http://localhost:8080/ in a browser
Note: on linux above steps also work with podman
instead of docker
.
docker login
docker build --platform linux/amd64 -t notmandatory/nonce_guess:latest .
docker push notmandatory/nonce_guess:latest
cd helm; helm package nonce-guess
helm install nonce-guess ./nonce-guess
- export POD_NAME and CONTAINER_PORT and start port-forward
export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=nonce-guess,app.kubernetes.io/instance=nonce-guess" -o jsonpath="{.items[0].metadata.name}") export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")` kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
- Visit http://127.0.0.1:8080 to use test application