Skip to content

Example doesn't work #40

@wbehrens-on-gh

Description

@wbehrens-on-gh

Copying the demo showed in the readme using handlebars

import { Router } from "oak";
import { handlebarsEngine, oakAdapter, viewEngine } from "view_engine";

const router = new Router();

router.use(
  viewEngine(oakAdapter, handlebarsEngine, {
    viewRoot: <string>`${Deno.cwd()}/views/`,
  }),
);

router.use((ctx) => {
  ctx.render("index.hbs", {});
});

export default router;

ctx.render doesn't exist?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions