Skip to content

miguelpelota/fundation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Fun and simple way to build a site

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 88.4%
  • CSS 11.6%