spark

command module
v0.0.0-...-1269de0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2016 License: MIT Imports: 6 Imported by: 0

README

spark

Emergency web server

For those occasions when your webserver is down and you want to display a quick maintainance note. Or just want to quickly demo a static site. Or whatever :)

It can take a directory, a file or directly the body string.

❯ spark -h
Usage of spark:
  -address="0.0.0.0": Listening address
  -port="8080": Listening port
  -cert="cert.pem": SSL certificate path
  -key="key.pem": SSL private Key path
  -sslPort="10433": SSL listening port
  -status=200: Returned HTTP status code
  -path="/": URL path

examples

$ spark message.html
$ spark "<h1>Out of order</h1><p>Working on it...</p>"
$ spark static_site/
$ spark -port 80 -sslPort 443 "<h1>Ooops!</h1>"

To quickly generate a ssl certificate run:

go run $GOROOT/src/crypto/tls/generate_cert.go --host="localhost"

install

  • from source
go get github.com/rif/spark
  • static binaries (linux/arm/osx/windows):

Binary downloads

crossbuild

Just run ./crossbuild.sh (needs go 1.5 or later). It also compresses the binaries with upx, comment those lines if you don't need compression.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL