Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: worker errors on start (local development) #154

Open
wants to merge 13 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
feat: use ts-node to execute ts files in worker
  • Loading branch information
amhsirak committed Nov 8, 2024
commit 2bda187acb82a4c044f212f3591213c108ce920d
3 changes: 2 additions & 1 deletion server/src/server.ts
Original file line number Diff line number Diff line change
@@ -68,7 +68,8 @@ const workerPath = path.resolve(__dirname, isProduction ? './worker.js' : './wor
let workerProcess: any;
if (!isProduction) {
workerProcess = fork(workerPath, [], {
execArgv: ['--inspect=5859', '-r', 'ts-node/register'],
execArgv: ['--inspect=5859'],
execPath: 'ts-node'
});
workerProcess.on('message', (message: any) => {
console.log(`Message from worker: ${message}`);