Module

x/opine/src/view.ts>View

Fast, minimalist web framework for Deno ported from ExpressJS.
Very Popular
Go to Latest
class View
import { View } from "https://dotland.deno.dev/x/opine@2.2.0/src/view.ts";

Constructors

new
View(fileName: string, options?: any)

Initialize a new View with the given name.

Options:

  • defaultEngine the default template engine name
  • engines template engine require() cache
  • root root path for view lookup

Properties

defaultEngine: any
engine: any
ext: any
name: any
path: any
root: any

Methods

lookup(name: string)

Lookup view by the given name

render(options: object, callback: Function)

Render with the given options.

resolve(dir: string, file: string)

Resolve the file within the given directory.