Skip to main content
Module

x/oak_nest/mod.ts>NestFactory

Refer to nestjs to realize some common functions for Deno
Go to Latest
class NestFactory
Re-export
import { NestFactory } from "https://deno.land/x/oak_nest@v2.0.0/mod.ts";

Static Properties

private
optional
staticOptions: StaticOptions
app: ApplicationEx

Static Methods

private
serveStaticAssets(context: Context)
private
startView()

start serve view and static assets.

If has prefix either api or view of static assets, it will be served self without other check, so it`s a good idea to set prefix if you want to have a good performance.

Then it will check the extension of the pathname, if its optioned such as ejs`, it will be served view, otherwise it will be served static assets.

But if there is index.html in the static assets, it will be served first before the view.

create(module: ModuleType, cache?)
useStaticAssets(path: string, options?: StaticOptions)

Sets a base directory for public assets.