eta-dev / eta-docs

Documentation website for the Eta template engine
https://eta.js.org
7 stars 18 forks source link

Express and ETA doc page to modify #63

Closed droumanet closed 1 year ago

droumanet commented 1 year ago

On it should be not necessary to use app.engine() and app.set()... under deno, it works perfectly without it. By the way, is eta.render() fills status?


const express = require("express")
const app = express()
const path = require("path")
const port = 3000

var { Eta } = require("eta")

// views directory
let viewpath = path.join(__dirname, "views")

let eta = new Eta({ views: viewpath, cache: true })

app.get("/", (req, res) => {
  res.send(eta.render("index", { title: "Hey", place: "Hello there!" }))
})

app.listen(port, () => {
  console.log(`Example app listening on port ${port}`)
})
nebrelbug commented 1 year ago

Good point! Will you create a PR to change that?

It doesn't fill the status.

droumanet commented 1 year ago

Well, if I could help, I would, however, I'm a beginner at PR: should I fork the project first? I'm learning and want to enhance my skills 🙂