Stormkit LogoStormkit Logo WhiteStormkit

Deploying Next.js websites

Next.js is a framework written for React applications which handle server side logic. You can easily host your Next.js applications on Stormkit.

To host your app simply go to your application's build config. Click on My application > My environment > Edit and specify the following fields in your build configuration:
FieldDescription
Entry filePath to next.config.js file.
Public folderPath to .next folder.
Build commandThe build command. For instance, npm run build.
Before deploying, we need to tell Next.js to serve the static files from our CDN and that it's serverless build. Go ahead and update the next.config.js:// Next.config.js { target: "serverless", assetPrefix: process.env.PUBLIC_PATH } And that should be it. Click deploy and have your serverless Next.js application up and running - ready to be served to millions of users.