@ludin-docs/node
v0.6.5
Published
Plain node:http adapter for ludin – OpenAPI docs with login, accounts, IP allowlist and a themeable UI.
Downloads
363
Readme
@ludin-docs/node
Plain node:http adapter for ludin — API docs with login, accounts & roles, IP allowlist and an audit log.
npm i @ludin-docs/core @ludin-docs/nodeimport http from 'node:http';
import { ludin } from '@ludin-docs/node';
const docs = ludin({ spec: './openapi.yaml', basePath: '/docs', auth: { users: [...] } });
http.createServer((req, res) => docs(req, res, () => { res.statusCode = 404; res.end(); })).listen(3000);Also works with connect and polka. createLudinServer(options) returns a ready-made server when the docs are all you serve.
All options and roles are documented in the main README.
MIT
