A minimal Dataflow programming engine
See:
You can run this "Hello World" by cloning dflow repository and launching
npm run example:hello_worldBasically it defines a single DflowNode that outputs "Hello, World!"
and creates a dflow instance that run it.
import { Dflow, type DflowNode } from "../../dflow.ts";
// Define a node.
const helloWorld: DflowNode = {
kind: "hello",
run: () => console.log("Hello, World!")
};
const nodeDefinitions = [helloWorld];
// Create a dflow instance.
const dflow = new Dflow(nodeDefinitions);
// Add a node to the graph.
dflow.node("hello");
// Run the dflow graph.
dflow.run();