Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/twlite/liquid-express

Better Liquid template engine for express.js
https://github.com/twlite/liquid-express

Last synced: about 1 month ago
JSON representation

Better Liquid template engine for express.js

Awesome Lists containing this project

README

        

# Liquid Express
Better Liquid template engine for express.

# Installation
## Install Express

```sh
npm install express

```

## Install Liquid

```sh
npm install liquid

```

## Install Liquid Express

```sh
npm install liquid-express

```

# Example
## server.js

```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

```html

Liquid Express

Hello, My name is {{name}}!

```

# Join my discord
**[https://discord.gg/2SUybzb](https://discord.gg/2SUybzb)**