fundation

0.0.56 • Public • Published

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>

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i fundation

Weekly Downloads

3

Version

0.0.56

License

MIT

Last publish

Collaborators

  • nonstopcoder