9

私は clojure と compojure が初めてで、Ruby の Sinatra (shotgun gem を使用) または Java の Play でできるように、コード変更のホット リロードを行う方法があるかどうか疑問に思っていました。

私はこのHerokuチュートリアルに従っているので、フォアマンgemでそれを行う方法があればそれも機能します.

ありがとう!

4

2 に答える 2

7

このSOqを見てください:

そしてこのチュートリアル:

提案は、リングのリロード ミドルウェアを使用することです。

于 2011-12-15T02:43:25.607 に答える
2

Recent versions of Compojure make it even easier by incorporating all of the middleware into a single function call:

https://github.com/weavejester/compojure/wiki/Getting-Started

In particular...

(require '[compojure.handler as handler])

; define my-routes in here as normal
(handler/site my-routes)

I'm using some of this in my own projects. It works well, but I'll switch back to choosing ring middleware directly if I decide that I need to add or remove anything.

于 2011-12-15T17:42:52.023 に答える