jsembedtemplateengine

1.0.0 • Public • Published

JSembedTemplateEngine

NPM

I couldn't think of a name that's more stupid.

I am recreating EJS??? This time, it's an Express.JS engine.

Exampel:

const engine = require("jsembedtemplateengine");
const app = require("express")();
engine(app);
app.set('views', '.')
app.set('view engine', 'jsembeds');

app.get("/", function(req, res) {
	res.render("index", { value: "content" });
});

Customisation

The first argument to the engine function is ALWAYS the express app object.

The second argument is JSEmbeds' options, but in an object.

Example with embedOpen and embedClose:

engine(app, {embedOpen: "<embed>", embedClose: "</embed>" });

Package Sidebar

Install

npm i jsembedtemplateengine

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

2.48 kB

Total Files

5

Last publish

Collaborators

  • pc-trollbox