use wrangler to create your namespace.
npx wrangler kv:namespace create "NOTIFY_USERS"
and set the id inside the wrangler.toml file.
how to create the server key also see wrangler file at vars for more details.
cd src npx wrangler publish
if you use secrets make sure to pass them like so: --binding KEY1=value1
npx miniflare src/dist/worker.js --kv-persist --wrangler-config wrangler.toml
see above steps on run in miniflare
(with env file in current dir / or use --binding KEY1=value1 see [miniflare](#Run in miniflare))
example of disable frontend using parameters
docker run -p 8787:8787 test --binding SERVE_FRONTEND=
or use env file (see miniflare documentation)
docker run -p 8787:8787 -v ${pwd}/env:/usr/app/.env -v ${pwd}/persistance:/usr/app/data ghcr.io/k0in/notify:main
you can also save your persistent data in a volume
/usr/app/data
go to your browser and run this script in your console: script it will print a random generated server key that will be used to send web notifications. You will need to set the resulting string inside your secrets (for that see miniflare secrets or cloudflare secrets)