Skip to content

Instantly share code, notes, and snippets.

@vcanales
Created April 26, 2016 13:36
Show Gist options
  • Save vcanales/f0bec70899c70ab40ea580d2360ed229 to your computer and use it in GitHub Desktop.
Save vcanales/f0bec70899c70ab40ea580d2360ed229 to your computer and use it in GitHub Desktop.
Load Controllers
loadControllers() {
let controllers = fs.readdirSync('./controllers');
controllers.map((file) => {
if (file != config.controllers.mainController) {
this.files.push(file);
this.controllers.push(JSON.parse(`{ "fileName": "${file}", "actions": [] }`));
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment