Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
require('@codetanzania/ewea-common');
const { error, debug } = require('@lykmapipo/logger');
const { start, listen } = require('@lykmapipo/postman');
const { connect } = require('./database');
debug('Start Launching Worker');
// connect to database
connect(err => {
// throw if error
if (err) {
error('Fail Launching Worker', err);
throw err;
}
// TODO: worker job events
// start kue worker
start();
// start kue http & ui
listen();
connect(err => {
// throw if error
if (err) {
error('Fail Launching Worker', err);
throw err;
}
// TODO: worker job events
// start kue worker
start();
// start kue http & ui
listen();
debug('Finish Launching Worker');
});
require('@codetanzania/ewea-common');
const { error, debug } = require('@lykmapipo/logger');
const { start } = require('./http');
debug('Start Launching Http Server');
// start http server
start((err, { PORT }) => {
// throw if error
if (err) {
error('Fail Launching Http Server', err);
throw err;
}
debug(`Http Server Running At http://0.0.0.0:${PORT}`);
debug('Finish Launchin Http Server');
});
start((err, { PORT }) => {
// throw if error
if (err) {
error('Fail Launching Http Server', err);
throw err;
}
debug(`Http Server Running At http://0.0.0.0:${PORT}`);
debug('Finish Launchin Http Server');
});
connect(err => {
// throw if error
if (err) {
error('Fail Launching Worker', err);
throw err;
}
// TODO: worker job events
// start kue worker
start();
// start kue http & ui
listen();
debug('Finish Launching Worker');
});
start((err, { PORT }) => {
// throw if error
if (err) {
error('Fail Launching Http Server', err);
throw err;
}
debug(`Http Server Running At http://0.0.0.0:${PORT}`);
debug('Finish Launchin Http Server');
});
syncIndexes((error, results) => {
if (error) {
warn('Fail Syncing Indexes', error);
} else {
debug('Finish Syncing Indexes', results);
}
process.exit(0);
});
require('@codetanzania/ewea-common');
const { warn, debug } = require('@lykmapipo/logger');
const { syncIndexes } = require('../src/database');
debug('Start Syncing Indexes');
syncIndexes((error, results) => {
if (error) {
warn('Fail Syncing Indexes', error);
} else {
debug('Finish Syncing Indexes', results);
}
process.exit(0);
});
waterfall(tasks, error => {
if (error) {
warn('Fail Seeding Data', error);
} else {
debug('Finish Seeding Data');
}
process.exit(0);
});
waterfall(tasks, error => {
if (error) {
warn('Fail Seeding Data', error);
} else {
debug('Finish Seeding Data');
}
process.exit(0);
});