@rankmyseo/server-nitro
v1.0.2
Published
Nitro/h3 adapter for RankMySEO server handler
Maintainers
Readme
@rankmyseo/server-nitro
Nitro / h3 adapter for RankMySEO — use from Nuxt server routes or standalone Nitro. Requires Node.js ≥ 20.
Install
npm i @rankmyseo/server-nitro @rankmyseo/core @rankmyseo/storage h3h3 is a peer dependency (^1 — the version shipped with Nitro / Nuxt 3).
Usage — Nitro / Nuxt catch-all
server/api/rankmyseo/[...].ts:
import { defineConfig } from "@rankmyseo/core";
import { createStore } from "@rankmyseo/storage";
import { createRankMySeoNitroHandler } from "@rankmyseo/server-nitro";
const store = createStore(process.env.DATABASE_URL!);
const config = defineConfig({
databaseUrl: process.env.DATABASE_URL!,
tenantId: "tenant-a",
projectId: "project-1",
dataSources: [{ provider: "fixture", default: true }],
});
export default createRankMySeoNitroHandler(store, {
config,
basePath: "/api/rankmyseo",
});The adapter converts the h3 event with toWebRequest, calls createHandler, and writes the result with sendWebResponse (streaming-friendly when the runtime supports it).
Documentation
See the Wiki → Getting Started.
License
Apache-2.0
