| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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.
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/sparkplugThen verify that sparkplug was installed correctly:
sparkplug -hIn your terminal, navigate to the source directory of your web server, then execute:
sparkplugOnce 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).
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.
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
| Back | FazBrowse Home | New Git URL |