-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
27 lines (22 loc) · 750 Bytes
/
server.js
File metadata and controls
27 lines (22 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* Author: Claudio A. Marrero
* Email: cmarrero01@gmail.com
* This is a test project that load 2 controllers and
* boths see with each other, and you can call any function of each controller.
*/
//File module
var fs = require('fs');
//Load config folder (database, loads, routes, etc)
var load = ['./config/'];
//Make an object with every native module and var that I want to share with all files
var params = {
fs:fs,
load:load
};
//Load the first config modules
var loader = require('./load.js')(params);
//Load every module that the config/load.js have into they array.
var Dependencies = loader.init();
console.log(Dependencies);
//Now, you can use every module, controller or everything that you want.
Dependencies.controller_a.init();