Skip to content

Include not working dejs #54

@bytedeveloperr

Description

@bytedeveloperr

Hello, guys I'm having problem in including ejs file

I included my controller

import { viewPath } from "../globe.ts";
import { renderFile } from "https://deno.land/x/dejs/mod.ts";
const { copy, stdout } = Deno;
const home = async () => {
  let home = await renderFile(`${viewPath}/home.ejs`, { vp: viewPath });
  //return await copy(home, stdout);
};

export { home };

in my app entry point

import { app, get, post } from "https://denopkg.com/syumai/dinatra/mod.ts";
import { home } from "./controllers/app.controllers.ts";

app(
  get("/", async () => await home()),
);

in my home.ejs

<%- await include(`partials/head.ejs`, {}); %>

the result in browser just returned Internal server error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions