Skip to content

Hive Functions

Hive Functions runs your code when it’s needed, without a server to manage. Write a handler, deploy it, and every request to https://<name>.fn.dockhive.app runs it: webhooks, small APIs, form handlers, glue between services, scheduled jobs.

You pay for requests and the compute your code uses, nothing while it sits idle. Every plan, including Free, comes with a monthly allowance.

Languages Rust, Go, TypeScript, JavaScript and Python, or upload a prebuilt Hive Bytecode (.hbc) file
Address https://<name>.fn.dockhive.app, any method and any path
Triggers HTTP requests and schedules (cron or @every 5m)
Built in Per-function storage that survives new versions, outbound HTTP, secrets, environment variables and logs
Deploys From the console editor (TypeScript, JavaScript, Python) or the dockhive CLI (every language). The last 10 versions are kept for one-click rollback.
Regions Every DockHive region; a function lives in the region you pick
Free plan 5 functions, 100,000 requests and 100,000 compute units a month, per region
  1. Create a function in the console (Hive Functions > New function): give it a name, pick a language and the region closest to your users. It gets its URL straight away.
  2. Write the handler. It receives the request (method, path, query, headers, body) and returns text, JSON, or a full response with status and headers.
  3. Deploy. DockHive builds your code into Hive Bytecode and switches to the new version once the build succeeds. A failed build leaves the running version untouched.
  4. Watch it run in Logs, test it with Test, and add schedules, secrets and environment variables in Settings.
const { hive, db } = require('hivekit')
hive.define('handler', (request) => {
const visits = (db.get('visits') || 0) + 1
db.set('visits', visits)
return { message: 'Hello from Hive Functions', visits, path: request.path }
})

Every request to the function’s URL calls handler. See Languages for the same handler in each language.

Each plan includes a monthly allowance of requests and compute units (see Limits and regions). On paid plans, usage above it is billed at:

Price
Requests $0.10 per million
Compute units $5 per million

A compute unit measures the work your code does in a run, so short handlers use a small fraction of one. Bytes your function sends and receives with outbound HTTP count as bandwidth.

Next: the Quickstart.