2018-10-21 18:18:00 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
|
|
|
// ****************************************************************************
|
|
|
|
// THIS IS FOR DEV PERROSES ONLY AND WILL NOT BE PART OF THE PUBLISHED PACKAGE
|
2018-10-19 14:38:50 +00:00
|
|
|
// Before opening a PR you should build and test your changes using bin/balena
|
2018-10-21 18:18:00 +00:00
|
|
|
// ****************************************************************************
|
|
|
|
|
|
|
|
// We boost the threadpool size as ext2fs can deadlock with some
|
|
|
|
// operations otherwise, if the pool runs out.
|
|
|
|
process.env.UV_THREADPOOL_SIZE = '64';
|
|
|
|
|
2019-01-11 15:34:29 +00:00
|
|
|
// Use fast-boot to cache require lookups, speeding up startup
|
|
|
|
require('fast-boot2').start({
|
2019-06-07 13:58:28 +00:00
|
|
|
cacheFile: '.fast-boot.json',
|
2019-04-25 17:39:16 +00:00
|
|
|
});
|
2018-10-21 18:18:00 +00:00
|
|
|
require('coffeescript/register');
|
2019-06-07 13:58:28 +00:00
|
|
|
|
|
|
|
const path = require('path');
|
|
|
|
const rootDir = path.join(__dirname, '..');
|
2019-04-25 17:39:16 +00:00
|
|
|
// Note: before ts-node v6.0.0, 'transpile-only' (no type checking) was the
|
|
|
|
// default option. We upgraded ts-node and found that adding 'transpile-only'
|
|
|
|
// was necessary to avoid a mysterious 'null' error message. On the plus side,
|
|
|
|
// it is supposed to run faster. We still benefit from type checking when
|
|
|
|
// running 'npm run build'.
|
2019-06-07 13:58:28 +00:00
|
|
|
require('ts-node').register({
|
|
|
|
project: path.join(rootDir, 'tsconfig.json'),
|
|
|
|
transpileOnly: true,
|
|
|
|
});
|
2019-04-02 11:26:21 +00:00
|
|
|
require('../lib/app').run();
|