Framework
Next.js
Next.js App Router or Pages Router, with optional Prisma integration.
3000Requirements
next.config.js / .ts / .mjs in the root
This file is how DropDeploy identifies your project as Next.js.
"build" and "start" scripts in package.json
"build": "next build" and "start": "next start" must both be present.
Demo app
A minimal app that is ready to push and deploy. Copy the files below into a new repository, commit, and deploy — it should go live without any changes.
Quickstart
npx create-next-app@latest my-next-app
/** @type {import('next').NextConfig} */
const nextConfig = {};
module.exports = nextConfig;{
"name": "my-next-app",
"version": "1.0.0",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"next": "^15.0.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
}
}export default function Home() {
return (
<main style={{
display: 'flex', justifyContent: 'center', alignItems: 'center',
minHeight: '100vh', fontFamily: 'system-ui',
background: '#0f172a', color: '#f1f5f9',
}}>
<div style={{ textAlign: 'center' }}>
<h1 style={{ color: '#3b82f6' }}>Hello from DropDeploy!</h1>
<p style={{ color: '#94a3b8' }}>Next.js app is live.</p>
</div>
</main>
);
}export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}Build & start commands
DropDeploy runs these steps inside the container when you click Deploy.
npm install # if prisma/schema.prisma exists: npx prisma generate npm run build npm start
Environment variables
Set these in Project → Env Vars in the dashboard. Never commit secrets.
| Variable | Required | Description |
|---|---|---|
| DATABASE_URL | No | Runtime database connection string. Required if your app queries a DB. |
| NEXT_PUBLIC_* | No | Baked into the client bundle at build time. Add them in the dashboard before deploying. |
| NEXTAUTH_SECRET | No | Required if using NextAuth. |
| NEXTAUTH_URL | No | Set to your full DropDeploy subdomain URL. |
Common issues
NEXT_PUBLIC_ vars are empty
These are baked in at build time. Add them to the dashboard env vars before you click Deploy.
Prisma "PrismaClient did not initialize"
Set DATABASE_URL as a runtime env var. The placeholder value used during the build is not a real connection.
output: "export" is not supported
DropDeploy runs next start which requires a server. Remove output: "export" from next.config, or use the React framework type for fully static output.