Using ejs with polka?
See original GitHub issueHi, I’m a little bit confused on how would you use the ejs (Embedded JavaScript) template engine in polka, this is how i do it in express
app.set("views", path.join(__dirname, "views")); // tell express where all our pages are
app.set("view engine", "ejs");
app.get("/", (req, res) => {
res.render("index.ejs", { someVariable: "someValue" });
});
Issue Analytics
- State:
- Created 5 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Polka-ejs NPM | npm.io
Polka EJS. Adds ejs template engine support to polka. Install. npm install polka-ejs. Usage. const polka = require("polka"); const ejs ...
Read more >polka-ejs - npm Package Health Analysis | Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >Introduction to Polka (an alternative to Express.js)
Polka doesn't offer any built-in view/rendering engines. (Using ejs with polka?) Most templating engines can be incorporated into middleware functions or used ...
Read more >Polka: an express.js alternative - David.Dev
const ejs = require("polka-ejs"); app.use(ejs()); // load ejs for templating v var hello = "hello world"; app.get ...
Read more >Now You Node— #1 — Intro & polka - Medium
If you are familiar with Express.js you already know how to use polka but if you are building your first http server with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ik this thread is quite old but there’s a Polka plugin for EJS: https://github.com/ravener/polka-ejs/blob/master/index.js
just in case anyone needs it
dont work. What could be other reasons?