fundation
v0.0.56
Published
Fun and simple way to build a site
Downloads
13
Readme
Fundation
A fun and simple way to build a site.
var fundation = require('fundation');
var app = require('express')();
app.use(fundation.init());
app.listen(8080)
Installation
$ npm install fundation
Models
module.exports = function(app) {
return {
get: function (slug) {
return {
title: "My Title",
description: "Bacon ipsum dolor frankfurter ham"
}
}
};
};
Controllers
var article = require('fundation').model.article;
module.exports = function (app) {
app.route('/article/:slug')
.get(function (req, res, next) {
res.render('article.swig', {
article: article.get(req.params.slug)
});
});
};
Views
<h1>{{ article.title }}</h1>
<p>{{ article.description }}</p>