0.0.2 • Published 6 years ago
now-wrapper v0.0.2
work in progress, don't use this yet
setup
install
npm install now-wrapper --save-dev
now API token
now-wrapper
looks forprocess.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