Key Difference: The main setup difference is that you need to copy all variables from server/.env to web/.env for NextAPI configurations, and the bundler differs between Bun and Node.js.

Configuration Options


    Key Differences

    Environment Variables Setup

    Important: For NextAPI configurations (NextAPI + Node, NextAPI + Bun), you need to copy all variables from server/.env to web/.env. This is because the API routes run within the Next.js application.

    Bundler Differences

    ConfigurationBundlerPerformanceBundle Size
    Hono + BunBun bundler⭐⭐⭐⭐⭐Small
    NextAPI + NodeWebpack⭐⭐⭐Medium
    Hono + NodeWebpack/esbuild⭐⭐⭐⭐Small
    NextAPI + BunBun bundler⭐⭐⭐⭐⭐Small

    Runtime Performance

    ConfigurationStartup TimeMemory UsageCold Start
    Hono + Bun⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
    NextAPI + Node⭐⭐⭐⭐⭐⭐⭐⭐⭐
    Hono + Node⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐
    NextAPI + Bun⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐⭐

    Choosing Your Configuration

    Choose Hono + Bun (Default) if:

    • You want the fastest performance
    • You’re building a new project
    • You prefer modern, lightweight frameworks
    • You want excellent developer experience

    Choose NextAPI + Node if:

    • You’re familiar with Next.js API routes
    • You need extensive Node.js ecosystem compatibility
    • You prefer traditional webpack bundling
    • You’re migrating from existing Next.js projects

    Choose Hono + Node if:

    • You want Hono’s lightweight framework
    • You need Node.js ecosystem compatibility
    • You prefer traditional deployment methods
    • You want good performance with familiar tooling

    Choose NextAPI + Bun if:

    • You want Next.js API routes with Bun’s performance
    • You’re building a new project with Next.js
    • You want the best of both worlds
    • You prefer Bun’s bundler but want Next.js structure

    Next Steps

    Select your preferred configuration and follow the specific setup guide: Each guide will walk you through the specific setup process for your chosen configuration.