Tower makes your Go web development much more dynamic by monitoring file's changes in your project and then re-run your app to apply those changes – yeah, no more stopping and running manually! It will also show compiler error, panic and runtime error through a clean page (see the demo below).
go get github.com/webx-top/tower
cd your/project
tower # now visit localhost:8080
Tower will, by default, assume your web app's port is 5001-5050. These can be changed by:
tower -p 3000-4000
Or put them in a config file:
tower init
vim tower.yml
tower
Run the following command to increase the number of files that a process can open:
ulimit -S -n 2048 # OSX
browser: http://localhost:8080
\/
tower (listening 8080)
\/ (reverse proxy)
your web app (listening port range 5001-5050)
Any request comes from localhost:8080 will be handled by Tower and then be redirected to your app. The redirection is done by using httputil.ReverseProxy. Before redirecting the request, Tower will compile and run your app in another process if your app hasn't been run or file has been changed; Tower is using howeyc/fsnotify to monitor file changes.
Tower is released under the MIT License.