Module

x/fresh/server.ts>ServerContext

The next-gen web framework.
Extremely Popular
Go to Latest
class ServerContext
import { ServerContext } from "https://dotland.deno.dev/x/fresh@1.1.2/server.ts";

Constructors

new
ServerContext(
routes: Route[],
islands: Island[],
staticFiles: StaticFile[],
renderfn: RenderFunction,
middlewares: MiddlewareRoute[],
app: AppModule,
notFound: UnknownPage,
error: ErrorPage,
plugins: Plugin[],
importMapURL: URL,
jsxConfig: JSXConfig,
)

Methods

handler(): RequestHandler

This functions returns a request handler that handles all routes required by fresh, including static files.

Static Methods

fromManifest(manifest: Manifest, opts: FreshOptions): Promise<ServerContext>

Process the manifest into individual components and pages.

import ServerContext
import { ServerContext } from "https://dotland.deno.dev/x/fresh@1.1.2/server.ts";