Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/Nitecon/consul

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/Nitecon/consul

  • v0.0.0-20161208214427-7380208c4b81
  • Source
  • Go
  • Socket score

Version published
Created
Source

# Consul

Consul is a command line tool that builds and (re)starts your web application everytime you save a Go or template file, this repository was forked from the original fresh, application in order to add live reload functionality. It's a very basic hack to get it working, but it works really well.

If the web framework you are using supports the Fresh runner, it will show build errors on your browser.

It currently works with Traffic, Martini and gocraft/web.

Installation

go get github.com/Nitecon/consul

Usage

cd /path/to/myapp

Start fresh:

consul

Fresh will watch for file events, and every time you create/modifiy/delete a file it will build and restart the application. If go build returns an error, it will log it in the tmp folder.

Traffic already has a middleware that shows the content of that file if it is present. This middleware is automatically added if you run a Traffic web app in dev mode with Fresh. Check the _examples folder if you want to use it with Martini or Gocraft Web.

You can use the -c options if you want to specify a config file:

consul -c runner.conf

Here is a sample config file with the default settings:

root:              .
tmp_path:          ./tmp
build_name:        runner-build
build_log:         runner-build-errors.log
valid_ext:         .go, .tpl, .tmpl, .html
build_delay:       600
colors:            1
log_color_main:    cyan
log_color_build:   yellow
log_color_runner:  green
log_color_watcher: magenta
ignore_dirs:       vendor, logs
log_color_app:

Please note that in the list above the ignored_dirs is comma seperated list of relative directories.

Author

More

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 08 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc