Running Next.js in developer mode
In order to start the server, by convention we need to define a start script in package.json
, so we will add the following there:
{ "scripts": { "start": "next" } }
Now, you can start the server by typing this in the console:
$ npm start
Now, if you visit http://localhost:3000
in your browser, you will see the running server.