DuxtServer class

Duxt Server - Shelf-based HTTP server

Constructors

DuxtServer({int port = 3000, String apiDir = 'server/api', String? staticDir, List<Middleware> middleware = const []})

Properties

apiDir String
final
handler → Handler
Main request handler
no setter
hashCode int
The hash code for this object.
no setterinherited
middleware List<Middleware>
final
pipeline → Handler
Build the pipeline with middleware
no setter
port int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
staticDir String?
final

Methods

all(String path, Handler handler) → void
Register any method
delete(String path, Handler handler) → void
Register a DELETE route
get(String path, Handler handler) → void
Register a GET route
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
patch(String path, Handler handler) → void
Register a PATCH route
post(String path, Handler handler) → void
Register a POST route
put(String path, Handler handler) → void
Register a PUT route
start() Future<void>
Start the server
stop() Future<void>
Stop the server
toString() String
A string representation of this object.
inherited
use(String path, ApiHandler handler) → void
Register an API handler class

Operators

operator ==(Object other) bool
The equality operator.
inherited