Skip to content

tulipretail/sails-modular

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sails Modular App

This plugin allows you to create modular application using sailsjs library.

Licence Issues Forks Stars

Requirements

  • sailsjs >= 1.0

How to install this plugin

npm install sails-modular --save

How to use this plugin

Create a directory called modules in your app directory. All folders within modules directory will be loaded as a module in your application.

Following is a sample directory structure for you new module.

You can add things as per your needs. Have a look at these sample files in modules directory in this repo to get the idea.

app
  |-- modules
        |-- test
            |-- configs
                |-- routes.js
                |-- policies.js
            |-- controllers
                |-- TestController.js
            |-- models
                |-- TestModel.js
            |-- policies
                |-- isTest.js
            |-- services
                |-- TestService.js

How to test this module

Once your hook is loaded your new test module will be available. Access one of the routes defined in your new configs/routes.js file.

Packages

No packages published

Languages

  • JavaScript 100.0%