Skip to content

ljgeneral/appix

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Appix 1.0.0-alpha-01 Build Status

  • Es6 Node.js framework dev version
  • Lightweight application framework with dyependency injection and dynamic type checking for node js
  • This application framework is improved version of mvcjs nodejs framework

Features

  1. Appix follow reactive design pattern.
  2. Catch all runtime/syntax errors
  3. Has a dependency injection
  4. Built on top of ES6

Hello world example in appix

  • npm install appix

  • app/env.json

{
  "aliases": {
    "models": "@{appPath}/models",
    "views": "@{appPath}/views",
    "helpers": "@{appPath}/helpers"
  },
  "components": {
    "appix/logger": {
      "enabled": true,
      "console": true,
      "level": 30
    },
    "appix/router": {
      "useCustomErrorHandler": false
    }
  }
}
  • app/index.js
'use strict';
let di = require('appix');
let Bootstrap = di.load('@{appix}/bootstrap');
// bootstrap application
let init = new Bootstrap({
  listenPort: 9000,
  appPath:  __dirname + '/'
});
// set bootstrapped instance under custom name
di.setInstance('node', init);
// get router component
let router = init.getComponent('appix/router');
// add some routes
router.add([
 {
   url: '/',
   route: 'home/Index'
 },
 {
   url: '/favicon.ico',
   route: 'home/Favicon'
 }
]);
// run server
init.listen();
  • app/controllers/home.js
'use strict';
let di = require('appix');
let Controller = di.load('@{appix}/controller');
class Home extends Controller {
    actionIndex() {
        return 'Hello world';
    }
}
module.exports = Home;
  • run node app/index.js
  • open localhost:9000

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%