/go-now

Primary LanguageGoBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

go-now

Client for Zeit Now deployment API

Code of Conduct | Contribution Guidelines

GitHub release GoDoc Travis Go Report Card License

Installation

go get github.com/manifoldco/go-now

Example

import "github.com/manifoldco/go-now"

n := now.New("your-api-secret")

pkg := map[string]interface{}{
  "index.js": "require('http').Server((req, res) => { res.end('Hello World!'); }).listen();",
  "package": map[string]interface{}{
    "name": "hello-world",
    "scripts": map[string]string{
      "start": "node index",
    },
  },
}
d, err := n.Deployment.New(pkg)

// &{UID: "7Npest0z1zW5QVFfNDBId4BW", Host: "hello-world-abcdefhi.now.sh", State: "BOOTING"}