bayon-core

0.0.3 • Public • Published

Bayon

Bayon is a node.js MVC framework based on expressjs and implemented in ECMAScript Harmony standard.

Get Started

 
'use strict';
 
// export Home
module.exports = Home;
 
// Define class
function Home() {};
 
Home.index = function() {
    this.send(200, 'Hello World!');
};
 

Quick Start

inside [app root] directory open and modify route.js as below

module.exports = {
    root: {
        handler: 'Greeting@talk', // say which controller will handler this
        path: '/', // path for client request
        method: 'GET' //
    }
};

inside [app root]/controller directory create a controller file name GreetingController.js

'use strict';
 
module.exports = Greeting;
 
function Greeting() {};
 
Greeting.talk = function() {
    this.send(200, 'Hello!'); // send 
};
 

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    1
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i bayon-core

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • joden