npm install polka-ejs
const polka = ;const ejs = ;const app = ;app;app;app;
views/index.js with the following
The Number is <%= number %>
http://localhost:3000 will display the number
5 on the page!
All options with their default values.
Options can be overriden per call basis aswell
Few things to note
- ext is used if the extension is not provided in the render call, i.e lets you make views/index.html and if ext is set to
- Cache uses the simple in memory cache that comes with ejs to override this
require()ejs and change the value of
ejs.cachelike examples in their readme
- Could possibly work with other frameworks if they have a similar style of middleware but i haven't seen any.