Marrow is a Cloudflare Worker that serves as an internal API service for the Finasaan application.
- Supabase Integration: PostgreSQL database connection via Supabase client
- Health Check: Service health monitoring endpoint
- CORS Support: Configured for cross-origin requests
- Simple HTTP API: Easy to consume REST endpoints
This service connects to a PostgreSQL database via Supabase. The schema is shared with the spine service.
For local development, the service connects to a local Supabase instance (Docker). Configure your .dev.vars file:
# Local Supabase connection (Docker container)
SUPABASE_URL=http://localhost:54321
SUPABASE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0For production, set the secrets using Wrangler:
npx wrangler secret put SUPABASE_URL
# Enter your Supabase project URL when prompted
npx wrangler secret put SUPABASE_KEY
# Enter your Supabase anon key when promptedHealth check endpoint for monitoring service status.
Response:
{
"status": "healthy",
"service": "marrow",
"timestamp": "2025-01-01T00:00:00.000Z"
}Test database connection.
Simple hello world endpoint.
# Install dependencies
npm install
# Generate Cloudflare types
npm run cf-typegen
# Start development server (port 8788)
npm run dev
# Deploy to Cloudflare
npm run deploy