File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed
ecosystem-tests/cf-worker Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # CF Worker Ecosystem Test
2+
3+ This test runs a minimal workflow using
` [email protected] ` in a Cloudflare Worker environment.
4+
5+ ## How to Run
6+
7+ - Install dependencies: ` npm install `
8+ - Deploy or run locally using a tool like ` wrangler ` .
9+
10+ The entrypoint is ` index.ts ` .
Original file line number Diff line number Diff line change 1+ import { Workflow } from 'langbase' ;
2+
3+ export default {
4+ async fetch ( request : Request ) {
5+ // Simple workflow step
6+ const workflow = new Workflow ( { debug : true } ) ;
7+ const result = await workflow . step ( {
8+ id : 'hello' ,
9+ run : async ( ) => 'world' ,
10+ } ) ;
11+ return new Response ( JSON . stringify ( { result} ) , {
12+ headers : { 'content-type' : 'application/json' } ,
13+ } ) ;
14+ } ,
15+ } ;
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " cf-worker-test" ,
3+ "version" : " 1.0.0" ,
4+ "type" : " module" ,
5+ "private" : true ,
6+ "dependencies" : {
7+ "langbase" : " 1.2.0"
8+ }
9+ }
You can’t perform that action at this time.
0 commit comments