2
0
Fork 0
tcrud/lib/node-ff-tcrud.js
2017-06-10 16:53:29 +02:00

27 lines
924 B
JavaScript

var debug = require('debug')('ff:tcrud');
var startTime = new Date().getTime();
debug('Init welcome');
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');
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
};