DEV Community

Cover image for next js app on cPanel
nikhil mahato
nikhil mahato

Posted on

1

next js app on cPanel

const nextConfig = {
    output:'export',

};
Enter fullscreen mode Exit fullscreen mode
npm run build

Enter fullscreen mode Exit fullscreen mode

This command will create a production build of your project in the out directory.
Image description

Finally, deploy your project:

Open your hosting provider’s control panel.

  • Navigate to the File Manager.
  • Go to the public folder.
  • Upload the contents of the out directory to the public folder.

And that's it! Your Next.js project is now live.
Image description

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series 📺

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series 👀

Watch the Youtube series