liquid-express

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i liquid-express

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

2.6 kB

Total Files

3

Last publish

Collaborators

  • snowflake7