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 };