Mastra Deployment and Server Configuration
Comprehensive guide for deploying Mastra applications. Covers MastraServer with adapter packages (@mastra/express, @mastra/hono, @mastra/fastify, @mastra/koa), authentication providers, custom API routes, middleware, MastraClient SDK, and cloud deployment (Vercel, Cloudflare, Netlify, AWS, Azure, Digital Ocean).
Usage
/mastra-deploy
Provides context for:
MastraServerfrom adapter packages (notcreateServer)- Server adapters: Express, Hono, Fastify, Koa
- Auth:
MastraAuthBetterAuth,MastraAuthClerk,MastraAuthSupabase registerApiRoute()with Hono-style contextMastraClientSDK (getAgent(),getWorkflow())- Cloud deployers:
VercelDeployer,CloudflareDeployer,NetlifyDeployer - Middleware and request context patterns