In this tutorial, We will deploy next.js project with prodution build in cpanel. When we deploy it in production it is really fast than the developemnt build.
Next.js creates issues when we deploy it to the cpanel with production. But we will solve those issue as well for deploying it to the cPanel.
In package.json include these scripts:
{
"scripts": {
"dev": "node server.js",
"build": "next build",
"start": "NODE_ENV=production node server.js"
}
}
17 сен 2024