Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/oak_nest/src/factorys/nest.factory.ts>NestFactory

Refer to nestjs to realize some common functions for Deno
Go to Latest
class NestFactory
import { NestFactory } from "https://deno.land/x/oak_nest@v1.13.15/src/factorys/nest.factory.ts";

Static Properties

private
isViewStarted: boolean
private
optional
staticOptions: StaticOptions

Static Methods

private
checkWithPrefix(prefix: string, pathname: string)
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.