DEV Community

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

Posted on

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)