Enable tracing by config so we can enable from argv, env variable, or config file (#41)
This commit is contained in:
parent
ddfe94beab
commit
07bc094890
|
@ -2,7 +2,13 @@
|
|||
|
||||
console.log('server process.env.NODE_ENV', process.env.NODE_ENV);
|
||||
|
||||
if (process.argv.includes('--tracing')) {
|
||||
const assert = require('assert');
|
||||
const config = require('./lib/config');
|
||||
const basePort = config.get('basePort');
|
||||
assert(basePort);
|
||||
const tracing = config.get('tracing');
|
||||
|
||||
if (tracing) {
|
||||
console.log('Tracing is active 🕵️');
|
||||
const { startTracing } = require('./tracing/tracing.js');
|
||||
startTracing();
|
||||
|
@ -11,8 +17,6 @@ if (process.argv.includes('--tracing')) {
|
|||
const express = require('express');
|
||||
|
||||
const installRoutes = require('./routes/install-routes');
|
||||
const config = require('./lib/config');
|
||||
const basePort = config.get('basePort');
|
||||
|
||||
const app = express();
|
||||
installRoutes(app);
|
||||
|
|
Loading…
Reference in New Issue