liquid-express
v1.0.0
Published
Liquid template engine for express.
Downloads
5
Maintainers
Readme
Liquid Express
Better Liquid template engine for express.
Installation
Install Express
npm install express
Install Liquid
npm install liquid
Install Liquid Express
npm install liquid-express
Example
server.js
const express = require("express"); // import express
const app = require("liquid-express")(express()); // this method injects liquid view engine to your app
app.get("/", (req, res) => {
res.render("index", { // render index.liquid
name: "Snowflake"
});
});
app.listen(3000, () => console.log("Server started!"));
views/index.liquid
<!DOCTYPE html>
<html>
<head>
<title>Liquid Express</title>
</head>
<body>
<h1>Hello, My name is {{name}}!</h1>
</body>
</html>