0.0.2 • Published 6 years ago

now-wrapper v0.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

 

Build Status

 

work in progress, don't use this yet

setup

  1. install

    npm install now-wrapper --save-dev
  2. now API token

    now-wrapper looks for process.env.NOW_TOKEN You can generate a token from account/tokens

 

usage

Run your script in the directory you want to deploy

const { instance, alias } = require('now-wrapper')

const doStuff = async () => {
  /* we just made an app, let's deploy that baby */
  const deployment = await instance.deploy()
  if (!deployment.error) console.log(deployment.url)

  /* set alias */
  await alias.set(deployment.url, 'https://production-url.now.sh')

  /* instant regret, let's delete that thing */
  await instance.remove(deployment.url)
}

 

like it?

:star: this repo

 

license

MIT © siddharthkp