O'Reilly logo

Next.js Quick Start Guide by Kirill Konshin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Deploying to Now.sh

Heroku is a well known workhorse, but nowadays there are newer players that can do things even easier, for example, Now.sh.

In addition to the previous example, just add one more script with the now-specific name now-start to package.json:

// package.json{  "scripts": {    "heroku-postbuild": "npm run build",    "build": "next build",    "start": "next",    "server": "next start",    "now-start": "npm run server",    "test": "NODE_ENV=test jest"  }}

Then, install Now Desktop from their website, register/login, and run this:

$ now

That will produce something like this:

$ now> Your credentials and configuration were migrated to "~/.now"> Deploying ~/Sites/next-test under xxx> Your deployment's code and logs will be publicly accessible because ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required