dartvel_backend
library
Constants
-
The headers every response gets when it has not set the same name itself.
-
dvDefaultStrictTransportSecurity
→ const String
-
HSTS for a response served over TLS: one year, no
includeSubDomains,
since a framework cannot know what else runs under the same domain.
Functions
-
Adds
baseline to headers, keeping any header the handler already set,
and HSTS when overTls is true.
-
embedNativeServerLibrary(List<int> bytes)
→ void
-
Gives this process the native server library as bytes. Nothing to load
where there is no FFI, so this only records that the call was made.
-
embedNativeServerLibraryAt(String path, {required int offset, required int length})
→ void
-
Where there is no FFI there is no library to embed.
-
serve(Future<Response> handler(Request), {String host = '127.0.0.1', int port = 8080, TlsConfig? tls, bool h2c = false, CorsOptions? cors, String? staticDir, String? spaRoot, bool compression = true, Duration requestTimeout = const Duration(seconds: 60), int maxBodyBytes = 1024 * 1024, Iterable<DVRouteBodyLimit> routeBodyLimits = const <DVRouteBodyLimit>[], })
→ Future<ServerHandle>
-
Serves the handler configuration.