Skip to main content

Setup and health

Health check​

Answers without touching the database, for load balancers and uptime monitors. HEAD works too.

GET /health
{ "status": "ok" }

SDK: await nb.health().

Setup status​

Whether the first superuser still has to be created.

GET /setup
{ "required": true }

SDK: await nb.setupStatus().

Create the first superuser​

While no superuser exists, the server log prints a one-time setup token, valid for one hour, at most once a minute. Send it with the superuser's credentials. Once a superuser exists, this endpoint returns 404.

await nb.setup({
token: "<token from the server log>",
email: "you@example.com",
password: "a long password",
});
POST /setup

Body

ParamTypeDescription
tokenstringRequired. The setup token from the server log.
emailstringRequired.
passwordstringRequired.

Responses

The new superuser record. Sign in with nb.collection("_superusers").signInWithPassword(email, password).