nanobus.transport.http.server/v1
Description
APISource code
This component provides extensible HTTP server capabilities.
The functionality of your application is added
by including routers
and middleware
components.
Options
address
string
The listening address of the server.
middleware
Component[]
Array of HTTP Middleware component configurations.
routers
Component[]
Array of HTTP Router component configurations.
Examples
Basic configuration
- YAML
- TypeScript
transports:
http:
uses: "nanobus.transport.http.server/v1"
with:
address: ':8080'
middleware:
### See middleware
routers:
### See routers
import { HttpServerV1 } from "https://deno.land/x/nanobusconfig@v0.0.14/mod.ts";
app.transport(
"http",
HttpServerV1({
address: ":8080",
// See middleware
middleware: [],
// See routers
routers: [],
}),
);