[enh] Init project

This commit is contained in:
2019-05-28 12:57:37 +02:00
commit fa85ddcc1d
9 changed files with 3561 additions and 0 deletions

30
src/dwatcher.ts Normal file
View File

@@ -0,0 +1,30 @@
import * as minimist from 'minimist'
import * as path from 'path'
import {dwatch} from './lib/dwatch'
process.on('uncaughtException', (err) => {
// Dunno why this specific exception is not caught
console.error(err.stack || err.message || err);
process.exit(1);
});
process.on('unhandledRejection', (err) => {
// Dunno why this specific exception is not caught
console.error(err.stack || err.message || err);
process.exit(1);
});
(async () => {
const argv = minimist(process.argv.slice(2))
console.log('Starting...')
try {
await dwatch(argv.conf || path.join(__dirname, '../app.yml'))
} catch (e) {
console.error(e)
} finally {
console.log('Finished')
}
})()