在文件更改时自动重新编译并重新加载服务器

编程入门 行业动态 更新时间:2024-10-22 12:20:48
本文介绍了在文件更改时自动重新编译并重新加载服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道AppEngine可以做到这一点,但是我没有为此编写代码.

I know AppEngine does this, but I'm not coding for it.

我尝试使用Ruby world中的Guard来监听.go文件上的更改,并执行以下命令:

I tried using Guard from Ruby world, to listen on changes on .go files, and execute the following commands:

killall foo go build -race ./foo &

但是它永远不会将foo发送到后台,只是无限期地挂起.

But it never sends foo into background, it just hangs indefinitely.

你们如何解决这个问题?解决方案也必须跨平台(GNU/Linux和Mac).

How are you guys solving this problem? Solution has to be cross-platform too (GNU/Linux and Mac).

推荐答案

一个朋友为go编写了一个简单的Compile Daemon,对我自己的小型net/http-projects来说就像一个魅力.

A friend wrote a simple Compile Daemon for go, worked like a charm for my own small net/http-projects.

您可以在此处找到存储库: github/githubnemo/CompileDaemon

You can find the repository here: github/githubnemo/CompileDaemon

更多推荐

在文件更改时自动重新编译并重新加载服务器

本文发布于:2023-11-07 11:10:22,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1566290.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加载   服务器   文件

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!