undefined

FRNT is a middleware module to use with express 3.0+ that proxies your content server. Its a way of separating whatever system you are using as a CMS, from the actual rendering of your site. It gives you much more control of how things are rendered, and gives you the option to choose a better templating engine than what comes with your CMS.

You can, as an example, choose wordpress as your CMS but instead of creating html pages as your templates, you just create json templates. FRNT can consume these templates and merge them with your template engines html. It lets your use wordpress with its recognized UI, but without the need of spagetti php+html code.

Its super simple to set up:

var path = require('path');
var frnt = require('frnt');
var express = require('express');
var app = express();

// template engine, can be whatever you like
var doT = require('express-dot');

// make sure that your routes are set before the frnt middleware
app.use(app.router);

// here is where we set up the middleware
app.use(frnt.init({
    proxyUrl: "http://localhost:8080" // this is the internal URL for the data
}));

// define rendering engine
app.set('views', path.join(__dirname, "views"));
app.set('view engine', 'html' );
app.engine('html', doT.__express );

app.listen(3000);