Quickstart
You can deploy from the console editor or from a project folder with the dockhive CLI. TypeScript, JavaScript and Python work in both; Go and Rust deploy from the CLI.
1. Create a function
Section titled “1. Create a function”In the console, open Hive Functions and click New function. Give it a name, pick a Language and the Region closest to your users, and create it.
The function page shows its URL, for example https://orders-k3x9.fn.dockhive.app. DockHive adds a short suffix to the name you chose so every URL is unique.
2. Edit and deploy
Section titled “2. Edit and deploy”The Code card opens with a starter handler that echoes the request, counts visits in storage and shows how to call another API. Change it, then click Deploy.
DockHive builds the code and switches to the new version when the build succeeds. If the build fails, the Build log opens with the error and the running version stays as it was.
3. Test it
Section titled “3. Test it”In the Test card, click Run to call the deployed version once. Leave Function empty to call handler with a sample web request, or name another exported function (such as scheduled) and give it your own Input. The response shows the status, the time it took and the result.
4. Call the URL
Section titled “4. Call the URL”curl https://orders-k3x9.fn.dockhive.app/hello?name=AdaAny method and any path reach your handler; it reads them from the request it receives.
5. Watch the logs
Section titled “5. Watch the logs”Logs shows every request (status and duration), anything your code logs, schedule runs, builds and errors.
1. Install and sign in
Section titled “1. Install and sign in”The dockhive CLI is the same one used for DockHive Tunnel.
curl -fsSL https://dockhive.io/tunnel/install.sh | shdockhive login2. Start a project
Section titled “2. Start a project”mkdir orders && cd ordersdockhive functions init --language typescriptinit writes the starter for that language into the folder (handler.ts, handler.js, handler.py, main.go with go.mod, or src/lib.rs with Cargo.toml). Languages: typescript, javascript, python, go, rust.
3. Create the function
Section titled “3. Create the function”dockhive functions create orders --language typescript --region euCreated orders-k3x9 in eu URL: https://orders-k3x9.fn.dockhive.appWithout --region the function is created in us. Regions: us, eu, de, pt, asia, africa, ng, abuja.
4. Deploy
Section titled “4. Deploy”From the project folder:
dockhive functions deploy ordersUploading 1 files (1 KB) and building orders-k3x9...Version 1 is live: https://orders-k3x9.fn.dockhive.appdeploy uploads the folder (without node_modules, target, .git, virtual environments, build output and .env files), builds it and switches to the new version when the build succeeds. A failed build prints the build log and leaves the running version untouched. Use --dir to deploy another folder and --language to override the language.
You can refer to a function by the name you chose (orders) or its full name (orders-k3x9).
5. Call it
Section titled “5. Call it”dockhive functions invoke ordersdockhive functions invoke orders -X POST --path /items -d '{"name":"pen"}'invoke calls the function’s URL and prints the status, the time it took and the response body.
6. Watch the logs
Section titled “6. Watch the logs”dockhive functions logs orders # recent linesdockhive functions logs orders -f # keep printing new linesCommand reference
Section titled “Command reference”| Command | What it does |
|---|---|
dockhive functions list |
Lists your functions in every region, with language, region, live version and URL |
dockhive functions init [dir] --language <lang> |
Writes a starter project for a language |
dockhive functions create <name> --language <lang> --region <region> |
Creates a function and prints its URL |
dockhive functions deploy <name> [--dir .] [--language <lang>] |
Builds the folder and makes it the live version |
dockhive functions invoke <name> [-X METHOD] [--path /] [-d BODY] |
Calls the function’s URL |
dockhive functions logs <name> [-f] |
Shows recent logs, or follows them |
dockhive fn is a short alias for dockhive functions.
Roll back
Section titled “Roll back”The console’s Versions list keeps your last 10 deployed versions. Click Roll back to this on any of them to make it live again instantly; nothing is rebuilt.
Next steps
Section titled “Next steps”- Write your handler in your language: Languages.
- Keep data, call other APIs and use secrets: Storage, HTTP and secrets.
- Run code every few minutes or every night: Schedules.