Skip to content
Branch: master
Find file History
styfle Publish Stable
 - @now/build-utils@1.1.1
 - now@16.6.3
 - now-client@6.0.0
 - @now/next@2.1.1
 - @now/node@1.2.1
 - @now/routing-utils@1.4.0
 - @now/static-build@0.13.1
Latest commit 75aefdd Dec 9, 2019

now client

Build Status Join the community on Spectrum

The official Node.js client for deploying to Now. It supports v1 and v2 deployments.


Firstly, install the package:

npm install now-client
# or
yarn add now-client

Next, load it:

// v2
const { createDeployment } = require('now-client');
// v1
const { createLegacyDeployment } = require('now-client');

Then call inside a for...of loop to follow the progress with the following arguments:

  • <path> - a directory path / file path / array of file paths (must be on the same level)
  • <options> - An object containing token, an optional teamId and any now.json-valid fields
async function deploy() {
  let deployment;

  for await (const event of createDeployment(
    { token: process.env.TOKEN }
  )) {
    if (event.type === 'ready') {
      deployment = event.payload;

  return deployment;

Full list of events:

  // File events (receive relevant data as payload)
  // Deployment events (receive deployment object as payload)
  // Build events (receive build object as payload)

You can also get the events set programmatically:

import { EVENTS } from 'now-client';
You can’t perform that action at this time.