Skip to main content


Showing posts with the label Netlify

Deploying Next.js application to Netlify

Netlify provides global scale platfom for web projects without any server, devops and infrastructure setup. It has a good support deploy static and dynamic site and you can start your project for free. Deploying Static Site generated by Next.js Add following to the scripts in package.json . "start": "next start", "build": "next build", "export": "next export" Create netlify.toml file under root folder and add following commands. [build] command = "npm run build && npm run export" publish = "out" That's it. Go to and follow instruction on setting up project with github repository. Depoying server-rendered React Apps generated by Next.js Netlify follows serverless architecture. It has the concept of Functions. You need to add little extra steps. Add next-on-netlify library to your project with npm i next-on-netlify command. Add following to the scripts in p