1.0.5 • Published 5 years ago

node-pathify v1.0.5

Weekly downloads
3
License
ISC
Repository
github
Last release
5 years ago

#Installation

npm i node-pathify

#Config Create paths.js file on root folder

root
    - paths.js
    - node_modules
    - app
        - controllers
            - ...
        - models
            - schemas
                - ...

Export your aliases

// paths.js example

module.exports = {
	"schemas":		__dirname + '/app/models/schemas',
	"controllers":  	__dirname + '/app/controllers',
	"utils":		__dirname + '/app/utils',
	"ressources":    	__dirname + '/app/ressources',
	"config": 		__dirname + '/config',
	"uploads": 		__dirname + '/public/uploads'
};

#How to use

// app/controllers/foo.js

const _P = require('node-pathify');
const FooSchema = require( _P.schemas + '/foo' );

...
1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago