Skip to content

Instantly share code, notes, and snippets.

@sintaxi
Last active August 29, 2015 14:18
Show Gist options
  • Save sintaxi/9cbbcff3ef8e05c75e4e to your computer and use it in GitHub Desktop.
Save sintaxi/9cbbcff3ef8e05c75e4e to your computer and use it in GitHub Desktop.
surge library interface
var surge = require("surge")
var readableStream = surge.createReadableStream("path/to/project")
surge.publish(readableStream, { domain: "foobar.com", email: "[email protected]", password: "bigsecret" }, function(errors, deployment){
if (errors) return "invalid arguments. cant deploy."
deployment.on("error", function(err){
console.log("Oops! something went wrong")
})
deployment.on("progress", function(data){
console.log(data)
})
deployment.on("end", function(data){
console.log("all done")
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment