refactor: move isProduction variable
This commit is contained in:
@@ -18,6 +18,7 @@ import { fork } from 'child_process';
|
|||||||
import { capture } from "./utils/analytics";
|
import { capture } from "./utils/analytics";
|
||||||
import swaggerUi from 'swagger-ui-express';
|
import swaggerUi from 'swagger-ui-express';
|
||||||
import swaggerSpec from './swagger/config';
|
import swaggerSpec from './swagger/config';
|
||||||
|
const isProduction = process.env.NODE_ENV === 'production';
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
app.use(cors({
|
app.use(cors({
|
||||||
@@ -62,7 +63,6 @@ readdirSync(path.join(__dirname, 'api')).forEach((r) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const isProduction = process.env.NODE_ENV === 'production';
|
|
||||||
const workerPath = path.resolve(__dirname, isProduction ? './worker.js' : './worker.ts');
|
const workerPath = path.resolve(__dirname, isProduction ? './worker.js' : './worker.ts');
|
||||||
|
|
||||||
let workerProcess: any;
|
let workerProcess: any;
|
||||||
|
|||||||
Reference in New Issue
Block a user