dont know what happened
This commit is contained in:
17
server/config/controllers.js
Normal file
17
server/config/controllers.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import fs from 'fs';
|
||||
|
||||
const CONTROLLER_DIR = __dirname + '/../controllers';
|
||||
|
||||
class Controllers {
|
||||
|
||||
static sync(){
|
||||
fs.readdirSync(CONTROLLER_DIR).forEach(function(file) {
|
||||
var controller = require(CONTROLLER_DIR + '/' + file);
|
||||
Controllers[controller.NAME] = controller;
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default Controllers;
|
||||
Reference in New Issue
Block a user