Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appix

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appix

Lightweight application framework with dyependency injection and dynamic type checking for node js

  • 1.0.0-alpha-10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by250%
Maintainers
1
Weekly downloads
 
Created
Source

Appix 1.0.0-alpha-10 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

Documentation wiki

Hello world example in appix

  • npm install appix

  • app/env.json

{
  "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
// Route actions are case sensitive!
router.add([
    {
        url: '/',
        route: 'home/Index'
    },
    {
        url: '/goto301',
        route: 'home/Redirect301'
    },
    {
        url: '/goto',
        route: 'home/Redirect'
    },
    {
        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');
// Controllers can be inherited as many levels as you need
class Home extends Controller {

   actionRedirect() {
       return this.redirect('/', 302);
   }

   actionRedirect301() {
       return this.redirect('/', 301);
   }

   actionIndex() {
       return 'Hello world';
   }
}
module.exports = Home;
  • run node app/index.js
  • open localhost:9000

Keywords

FAQs

Package last updated on 18 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc