Get Module
Include local NodeJS modules relative to your root path
Installation
npm i --save getmodule
Usage
Add getmodule
on top of your app.js
(or main file of your app):
;
Now, you can call any module based on root path of your application.
If your module is on app/modules/mymodule.js
, but you're calling it on the
file app/controllers/controller.js
; in tradicional mode, you needed to do:
var mymodule = ;
But with getmodule
, you just need type this:
var mymodule = ;
Contributing
Check CONTRIBUTING.md
License
MIT License © Fernando Daciuk