2
0
Fork 0
tcrud/lib/node-ff-tcrud.js

27 lines
924 B
JavaScript
Raw Permalink Normal View History

2017-06-10 14:53:29 +00:00
var debug = require('debug')('ff:tcrud');
var startTime = new Date().getTime();
debug('Init welcome');
2015-06-19 23:08:29 +00:00
2017-06-10 14:53:29 +00:00
debug('Init objects...');
var requireAll = require('require-all');
var configRegistry = require('./config-registry');
var tcrudSetup = require('./tcrud-setup');
var tcrudConfig = require('./tcrud-config');
debug('Init objects done');
debug('Init plugins...');
configRegistry.pluginLoadTree(requireAll({dirname: __dirname + '/default',filter: /^([^\.].*)\.js?$/}));
configRegistry.pluginLoadTree(requireAll({dirname: __dirname + '/plugin',filter: /^([^\.].*)\.js?$/}));
debug('Init plugins done');
2015-06-19 23:08:29 +00:00
2017-06-10 14:53:29 +00:00
debug('Init backends...');
var tcrudBackend = requireAll({dirname: __dirname + '/backend',filter: /^([^\.].*)\.js?$/});
debug('Init backends done');
debug('Init done in %s ms.',(new Date().getTime()-startTime));
module.exports = {
setup: tcrudSetup,
config: tcrudConfig,
backend: tcrudBackend
};