Skip to content

Commit 8849b36

Browse files
committed
📦 NEW: node cjs
1 parent 8bc30eb commit 8849b36

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

ecosystem-tests/node-cjs/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Node.js CJS Ecosystem Test
2+
3+
This test runs a minimal workflow using `[email protected]` in a Node.js CommonJS environment.
4+
5+
## How to Run
6+
7+
- Install dependencies: `npm install`
8+
- Run: `node index.cjs`

ecosystem-tests/node-cjs/index.cjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const {Workflow} = require('langbase');
2+
3+
async function main() {
4+
const workflow = new Workflow({debug: true});
5+
const result = await workflow.step({
6+
id: 'hello',
7+
run: async () => 'world',
8+
});
9+
console.log({result});
10+
}
11+
12+
main().catch(console.error);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "node-cjs-test",
3+
"version": "1.0.0",
4+
"type": "commonjs",
5+
"private": true,
6+
"dependencies": {
7+
"langbase": "1.2.0"
8+
}
9+
}

0 commit comments

Comments
 (0)