class Application
implements ServerApplication
import { Application } from "https://dotland.deno.dev/x/aleph@v0.3.0-alpha.29/server/mod.ts";
The application class for aleph server.
Properties
readonly
config: RequiredConfigreadonly
importMap: ImportMapMethods
private
applyCompilationSideEffect(url: string, callback: (mod: Module) => void)apply compilation side-effect caused by dependency graph breaking.
private
compile(url: string, options?: { sourceCode?: string; forceCompile?: boolean; once?: boolean; }): Promise<Module>compile a moudle by given url, then cache on the disk.
private
createRouteUpdate(url: string): [string, string, { isIndex?: boolean; useDeno?: boolean; }]private
fetchModule(url: string): Promise<{ content: Uint8Array; contentType: string | null; }>fetch module content
private
isScopedModule(url: string)private
precompile(url: string,
sourceContent: Uint8Array,
contentType: string | null,
private
replaceDepHash(jsContent: string, dep: DependencyDescriptor)addModule(url: string, options?: { code?: string; }): Promise<void>
add a new page module by given path and source code.
findModuleByName(name: string): Module | null
getAPIRoute(location: { pathname: string; search?: string; }): [RouterURL, Module] | null
getCodeInjects(phase: "compilation" | "hmr" | "ssr")
getPageRoute(location: { pathname: string; search?: string; }): [RouterURL, RouteModule[]]
isHMRable(url: string)
lookupStyleModules(...urls: string[]): Module[]
resolveModule(url: string)