@opra/http
v1.28.5
Published
Opra Http Server Adapter
Readme
@opra/http
Standalone HTTP server adapter for the OPRA framework
🌐 Documentation · 🚀 Getting Started · 📦 Packages · 💬 Issues
Standalone HTTP server adapter for the OPRA framework. Plug your existing Express (or any compatible) application into OPRA with minimal setup.
Features
HttpAdapter— Abstract base for all HTTP platform adaptersExpressAdapter— Drop-in Express.js integrationHttpHandler— Full request lifecycle: parsing, validation, routing, responseHttpContext— Per-request context with typed access to params, headers, and body- Interceptors — Middleware pipeline at the adapter level
Installation
npm install @opra/httpUsage
import express from 'express';
import { ExpressAdapter } from '@opra/http';
const app = express();
const adapter = new ExpressAdapter(app, apiDocument, {
basePath: '/api/v1',
});
await adapter.initialize();
app.listen(3000);Node Compatibility
- node >= 20.x
License
Available under MIT license.
