1.0.0 • Published 5 years ago

liquid-express v1.0.0

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

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>

Join my discord

https://discord.gg/2SUybzb