Could you explain what the problem was? The ring-serve library should
work the same way as "lein ring server", minus the automatic reloading
of modified source files. It's pretty much the same code in both
projects.
- James
The latest Hiccup HEAD should solve that. I'll release a new version.
> (defroutes main-routes ...)
> (def app (handler/site main-routes))
>
> Then in REPL,
> (use 'ring.util.serve)
> (serve your-namespace.your-namespace/main-routes)
Why are you serving "main-routes" when your main handler is "app"?
- James
Probably a stupid question, but I cannot seem to figure this one out -
Is there an easy way to get all files compiled into REPL as a result
of clojure-jack-in? Do I need to C-c C-k each of them every time I
start REPL?
Thanks again,
- F
Just use or require the namespace your handler is in. All the
namespaces your handler namespace depends on will be loaded
automatically by Clojure.
(use 'your.handler.namespace)
If you want to reload files you can C-c C-k or use the :reload option:
(use 'your.handler.namespace :reload)
The :reload-all option should reload all dependent namespaces:
(use 'your.handler.namespace :reload-all)
- James