1.0.0 • Published 5 years ago
liquid-express v1.0.0
Liquid Express
Better Liquid template engine for express.
Installation
Install Express
npm install expressInstall Liquid
npm install liquidInstall Liquid Express
npm install liquid-expressExample
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>Join my discord
1.0.0
5 years ago