Skip to Main Content
Next.js Quick Start Guide
book

Next.js Quick Start Guide

by Kirill Konshin
July 2018
Intermediate to advanced content levelIntermediate to advanced
164 pages
3h 15m
English
Packt Publishing
Content preview from Next.js Quick Start Guide

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Create React App 2 Quick Start Guide

Create React App 2 Quick Start Guide

Brandon Richey
React Cookbook

React Cookbook

David Griffiths, Dawn Griffiths
Test-Driven React

Test-Driven React

Trevor Burnham

Publisher Resources

ISBN: 9781788993661Supplemental Content