Skip to content
Alan Thompson edited this page Mar 15, 2019 · 4 revisions

Can I serve my files from my own server?

Yes. In fact, this is considered the normal way of using Figwheel. Figwheel connects to ws://localhost:3449/figwheel-ws by default regardless of where you are serving the hosting HTML page from. If your client can load the compiled CLJS files then so can Figwheel.

It is in no way necessary to use Figwheel's static file server in order to use Figwheel.

What about HTTPS?

If you need to access the Figwheel websocket over HTTPS please use a proxy like https://github.com/jugyo/tunnels and then set the builds :websocket-url to "wss://localhost:443/figwheel-ws".

:cljsbuild 
  {:builds 
    [{:id "dev"
      :figwheel {:websocket-url "wss://localhost:443/figwheel-ws"}
      ...]}

How do I create my own server?

Ring is the defacto protocol for Clojure HTTP servers.

lein-ring is a convenient lein plugin to get your server up and running.

compojure is a popular Clojure routing library.