wns-mvc-package

MVC package/bundle for WNS Middleware

npm install wns-mvc-package
24 downloads in the last week
36 downloads in the last month

WNS's MVC Package (Official)

A powerful package for WNS Middleware supported by WNS Team that contains components to build MVC-structured applications.

This package requires a HTTP package like wns-http-package running on the parent module.

Features

  • Cotroller Server
  • Database ActiveRecord

Requirements

  • Node.JS + NPM
  • WNS Middleware v0.0.93+
  • WNS HTTP Package v0.1.2+

Installing

Enter your application's directory...

Installing with WNS Package Manager
$ wnspm install mvc
Installing with NPM

Inside your server or application directory just type:

$ npm install wns-mvc-package

Setting up MVC to you application

Edit your app's config.json and insert inside the component section, this code:

  // HTTP component configuration
  "controller": {
    "class": "wnControllerServer",
    "defaultController":"site",
    "errorPage": "site/error",
    "templateEngine": "Dust", // Or other template engine from wns-template-package
    "path": {
      "controllers": "controllers/",
      "views": "views/",
      "partials": "partials/"
    }
  }
npm loves you