Skip to main content
This recipe walks you through building a complete FlowDrop backend using Express.js. By the end, you’ll have a working API that FlowDrop can talk to.
FlowDrop includes a complete example Express server at apps/example-server-express/ in the repository. This recipe is based on that implementation.

Prerequisites

Step 1: Project Setup

Create tsconfig.json:

Step 2: Health Endpoint

Create src/index.ts:
Run it:

Step 3: Node Definitions

Create src/nodes.ts with your node metadata. Each node describes what appears in FlowDrop’s sidebar:
Add the nodes route in src/index.ts:

Step 4: Workflow CRUD

Create src/workflows.ts:
Add the workflow routes in src/index.ts:

Step 5: Categories & Port Config

Add these routes for the full sidebar and connection validation experience:

Step 6: Connect to FlowDrop

In your frontend, point FlowDrop to your backend:
Start both servers and you should see nodes in the sidebar, be able to drag them onto the canvas, connect them, and save workflows.

Production Considerations

This recipe uses in-memory storage for simplicity. For production:
  • Database: Replace the Map with PostgreSQL, MongoDB, or any persistent store
  • Validation: Add request body validation (zod, joi, etc.)
  • Authentication: Add auth middleware and configure FlowDrop’s authProvider
  • Rate limiting: Protect endpoints from abuse
  • Error handling: Add proper error middleware

Next Steps