loopback-mvc

1.0.3 • Public • Published

Loopback mvc plugin

This library allows use loopback also as MVC, adding support for controllers. It uses JulianDuniec/express-controllers for that, all merit goes to he, this is only a loopback wrap.

Author: Roger Fos Soler (desaroger23@gmail.com)

Usage

First, install the library:

$ npm i --save loopback-mvc

Now bind the app and the desired options:

let loopbackMVC = require('loopback-mvc');
loopbackMVC(app, {})

Options

Available options:

  • controllersFolder: Where the controllers are. Default: mvc/controllers.
  • views: If true, the library will set the express views folder and the views engine. Default: true. If this property is true, two more options are available:
    • viewsFolder: The views folder. It defines the express view. Default: mvc/views.
    • viewsEngine: The views engine. It defines the express view engine. Default: pug.

Example:

{
    "controllersFolder": "mvc/controllers",
    "viewsEngine": "pug"
}

Readme

Keywords

Package Sidebar

Install

npm i loopback-mvc

Weekly Downloads

0

Version

1.0.3

License

MIT

Last publish

Collaborators

  • desaroger