FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

skeswa/sparkplug: Exposes an HTTP endpoint to restart your go server. · GitHub

forked from codegangsta/gin
 
 

Latest commit

 

History

129 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡ sparkplug

sparkplug, like its predecessor gin, is a simple command line utility for restarting your Go server in a development setting. sparkplug improves upon gin by using filesystem notifications. Furthermore, sparkplug exposes an HTTP endpoint to facilitate manual restarts if need be.

Like gin, sparkplug adheres to the "silence is golden" principle, so it will only complain if there was a compiler error or if you succesfully compile after an error.

Installation

Assuming you have a working Go environment and GOPATH/bin is in your PATH, gin is a breeze to install:

go get github.com/skeswa/sparkplug

Then verify that sparkplug was installed correctly:

sparkplug -h

Usage

In your terminal, navigate to the source directory of your web server, then execute:

sparkplug

Once compiled, your server will then be exposed on port 3000 or the specified by the PORT environment variable.
The server may be restarted by changing any source file, or by requesting the /restart HTTP endpoint (this endpoint is configurable).

Supporting Sparkplug in Your Web app

sparkplug assumes that your web app binds itself to the PORT environment variable so it can properly proxy requests to your app. Web frameworks like Martini do this out of the box.

Using flags?

When you normally start your server with flags if you want to override any of them when running sparkplug we suggest you instead use github.com/namsral/flag as explained in this post

About

Exposes an HTTP endpoint to restart your go server.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL