jffl4express
v0.0.14
Published
Fluid Fragmented HTML Loader for Express by Julian Frank
Downloads
32
Readme
jffl4express
Fluid HTML Fragment Loader for Express
by Julian Frank
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