jffl4express
Version:
Fluid Fragmented HTML Loader for Express by Julian Frank
31 lines (23 loc) • 1.2 kB
Markdown
[](https://nodei.co/npm/jffl4express/)
[](https://nodei.co/npm/jffl4express/)
To use in your app from
```
npm install jffl4express --save
```
inside your code
```
'use strict' //Just asking the engine to be strict...Needed for ES6 Complaince
const app = require('express')() //Load Express into app
const loadJFFL = require('jffl4express').loadjffl //Load the jffl engine
app.set('views', '<jffl View Directory') //Tell Express to use the provided directory for asset loading
app.set('view engine', 'jffl') //Tell Express that jffl is a view Engine
app.engine('jffl', loadJFFL) //Tell Express to use the loadJFFL engine wheever jffl files are to be rendered
```
Usage
```
res.render('jffl file',{variables you want to inject into the html file generated}
```
To see a sample checkout the 'testjffl' folder inside node_modules\jffl