@temporalio/create
Advanced tools
Comparing version 0.3.1 to 0.3.2
{ | ||
"name": "@temporalio/create", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Create a Temporal project from template", | ||
@@ -29,3 +29,3 @@ "main": "lib/index.js", | ||
}, | ||
"gitHead": "d35439fbe6291d3ccda432572f142bd9537699fc" | ||
"gitHead": "766f94c1154962fe367f5b2d8737a50bc3badde9" | ||
} |
// @@@SNIPSTART nodejs-mtls-worker | ||
import fs from 'fs'; | ||
import { Worker } from '@temporalio/worker'; | ||
import { Worker, Core } from '@temporalio/worker'; | ||
import { getEnv, Env } from './mtls-env'; | ||
@@ -23,5 +23,4 @@ | ||
} | ||
const worker = await Worker.create({ | ||
workDir: __dirname, | ||
taskQueue, | ||
await Core.install({ | ||
serverOptions: { | ||
@@ -41,2 +40,7 @@ address, | ||
}); | ||
const worker = await Worker.create({ | ||
workDir: __dirname, | ||
taskQueue, | ||
}); | ||
console.log('Worker connection succesfully established'); | ||
@@ -43,0 +47,0 @@ // Start accepting tasks on the `tutorial` queue |
@@ -10,2 +10,5 @@ // @@@SNIPSTART nodejs-hello-worker | ||
// create() tries to connect to the server and will throw if a connection could not be established. | ||
// You may create multiple Workers in a single process in order to poll on multiple task queues. | ||
// In order to configure the server connection parameters and other global options, | ||
// use the Core.install() method to configure the Rust Core SDK singleton. | ||
const worker = await Worker.create({ workDir: __dirname, taskQueue: 'tutorial' }); | ||
@@ -12,0 +15,0 @@ // Start accepting tasks on the `tutorial` queue |
25658
433