A tree-shakeable API client for hosting.de built on top of @b3-business/cherry.
npm install @b3-business/hostingde
# or
pnpm add @b3-business/hostingde
# or
bun add @b3-business/hostingdeimport { createHostingDeClient, zonesFind } from "@b3-business/hostingde";
const client = createHostingDeClient({
apiToken: process.env.HOSTING_DE_API_TOKEN!,
routes: { zonesFind },
});
const result = await client.zonesFind({ limit: 10 });hosting.de has a few special API rules, handled automatically by this client:
- All endpoints are
POST authTokenmust be sent in the JSON body- Responses are wrapped (
{ status, response, metadata, errors, warnings })
zonesFindzoneConfigsFindrecordsFindnameserverSetsFindtemplatesFindzoneUpdate
Install and type-check:
bun install
bun run typecheckRun tests:
bun testbun test includes live DNS integration tests from test/dns-integration.test.ts.
These tests fail fast if HOSTING_DE_API_TOKEN_TEST1 is missing.
Before running tests, copy .env.example to .env and set:
HOSTING_DE_API_TOKEN_TEST1(required for tests)- optionally
HOSTINGDE_API_DEMO_HOST/HOSTINGDE_API_HOST(host overrides)
Build:
bun run buildMIT