flyzto 7 mēneši atpakaļ
vecāks
revīzija
cf4d98bc1e
1 mainītis faili ar 4 papildinājumiem un 2 dzēšanām
  1. 4 2
      server/models/Games.js

+ 4 - 2
server/models/Games.js

@@ -1,7 +1,9 @@
 const { fork } = require('child_process');
-const events_child = fork('./triangle/eventsMatch.js', [], {
+
+const childOptions = process.env.NODE_ENV == 'development' ? {
   execArgv: ['--inspect=9228']
-});
+} : {};
+const events_child = fork('./triangle/eventsMatch.js', [], childOptions);
 
 const Logs = require('../libs/logs');
 const Relation = require('./Relation');