fresh

Build and (re)start go web apps after saving/creating/deleting source files.

Github星跟踪图

unmaintained

Fresh

Join the chat at https://gitter.im/pilu/fresh
Build Status

Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file.

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/pilu/fresh

Usage

cd /path/to/myapp

Start fresh:

fresh

Fresh will watch for file events, and every time you create/modify/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.

fresh uses ./runner.conf for configuration by default, but you may specify an alternative config filepath using -c:

fresh -c other_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
no_rebuild_ext:    .tpl, .tmpl, .html
ignored:           assets, tmp
build_delay:       600
colors:            1
log_color_main:    cyan
log_color_build:   yellow
log_color_runner:  green
log_color_watcher: magenta
log_color_app:

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

主要指标

概览
名称与所有者gravityblast/fresh
主编程语言Go
编程语言Go (语言数: 1)
平台
许可证MIT License
所有者活动
创建于2014-01-15 14:22:25
推送于2024-06-21 17:16:17
最后一次提交2024-06-21 19:16:08
发布数0
用户参与
星数3.8k
关注者数54
派生数379
提交数41
已启用问题?
问题数66
打开的问题数36
拉请求数13
打开的拉请求数24
关闭的拉请求数24
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?