Added (frodo-instance)
, to get access to the current Frodo instance.
Thanks to Griffin Smith for the PR!
Updating Nomad dep to 0.7.0.
Broken due to failed deploy to Clojars.
Updated to provide compatibility with Nomad 0.7.0 and later - thanks Luke Snape for the PR!
No breaking changes - fixes #7. Frodo’s reload functions no longer
disappear after the first reload if there’s a user.clj
file present
in the classpath.
Thanks to Mark Fisher for the bug report!
Simplifying the AOT - doesn’t need to touch downstream projects’ AOT now.
No breaking changes - bugfix for {:aot :all} projects in uberjar
The ClojureScript browser REPL functionality has been removed from Frodo, in favour of splitting it out into a separate plugin, simple-brepl.
simple-brepl uses Weasel, which in turn uses WebSockets to connect the REPL to the browser. WebSockets seem (to me) to be a more logical abstraction to use than long-polling connections, and I’ve had far fewer reliability issues (dropped connections etc) with Weasel than Austin.
To migrate from 0.2.x to simple-brepl:
- In your Nomad config, remove
{:frodo/config {:nrepl {:cljs-repl? true}}}
- Instead of including
[:script (frodo/repl-connect-js)]
in the<body>
of your page, include[:script (simple-brepl.service/brepl-js)]
in the<head>
. - You now need to require
simple-brepl.client
somewhere in your CLJS app, rather thanclojure.browser.repl
. I do this in the main NS:(ns myapp-app (:require simple-brepl.client ...))
- To start a bREPL, eval
(simple-brepl)
in theuser
NS, rather than(frodo/cljs-repl)
.
The recommended entry point to a Frodo application is now through the
frodo.web/App
protocol, a protocol with start!
and stop!
functions for you to set up and tear down state and resources.
:handler-fn
and :handler
are still supported for backwards
compatibility, but they may be removed in a future version.
To (optionally) migrate from 0.2.x:
- In your Nomad config, substitute
{:frodo/config {:web {:handler-fn myapp.web/make-handler}}}
or
{:frodo/config {:web {:handler myapp.web/handler}}}
for
{:frodo/config {:web {:app myapp.web/app}}}
- In
myapp/web.clj
, substitute(defn make-handler [] (let [db-conn (connect-db! ...)] (api-routes db-conn)))
for
(:require [frodo.web :refer [App]]) (def app (reify App (start! [_] (let [db-conn (connect-db! ...)] {:db-conn db-conn :frodo/handler (api-routes db-conn)})) (stop! [_ system] (disconnect-db! (:db-conn system)))))
Allowing you to include :http-kit/options
in the :web
map to pass
options through to HTTP-kit
No breaking changes - updates to Nomad version. I’d advise you update to 0.2.11 as it includes the bugfixes in Nomad 0.6.2.
No code changes. Releases to appease Clojars - can’t promote without :scm key, can’t push over an existing release, have to make sure you’ve made a git commit before testing a clojars deploy etc etc etc.
Incorporating Stuart Sierra’s ’Reloaded’ workflow - call
(reload-frodo!)
from the REPL to reload the web server.
This is quite a big re-architect - splitting out into a frodo-core library and a minimal lein-frodo plugin. Hopefully this has made the whole codebase a lot simpler!
Adding in uberjar functionality - build an uberjar with lein frodo
uberjar
Deprecated: :handler
in config - replace with :handler-fn
and
ensure the referenced function is a zero-arg function returning a web
handler. Behaviour to be removed in 0.3.0. Existing behaviour will
work (for now) but you’ll get a deprecation warning.
Left in a cheeky println on startup - removed.
No breaking changes - CLJX support
Upstream dependency updates.
Minor bugfix - creating ‘target/classes’ directory if it doesn’t exist
Fixed a bug whereby requiring cemerick.austin.repls
when it wasn’t
linked threw exceptions. Now use (frodo/repl-connect-js)
which will
work if CLJS REPLs are turned on but won’t error if they’re turned off
(e.g. in prod)
No breaking changes. Frodo now uses http-kit to provide the web server. http-kit is compatible with ring and ring-jetty, so you shouldn’t have any trouble.
The :handler
key has been moved inside the :web
map in the config
file. The original location still works, but it has been deprecated,
and will be removed in 0.3.0.
Also, the nREPL port is now saved to target/repl-port
to be
consistent with lein repl
.
No breaking changes. Added CLJS REPL functionality.
No breaking changes. Better error handling if the user doesn’t specify a handler.
Initial release.