Fork me on GitHub

i'd like to run figwheel and use sente for web sockets in my own code. it seems like this might be possible, but i haven't been able to figure out how


got figwheel working alongside my own server. i get the feeling there's a better way to do this. any pointers much appreciated:

Jan K11:10:40 This project uses devtime-only figwheel that starts via the scripting API (shares JVM with the app) and also runs it's own httpkit + sente.


idk what i'm doing, so i would be more surprised to find out there isn't a better way to do this than to find out this is a pretty reasonable way to do this

Jan K11:10:00

I use figwheel and sente in my project without issues. You mean you want them to share one web server? Figwheel needs to run its own AFAIK


Figwheel was designed to be part of your server if you so choose, but it's very uncommon

Jan K11:10:18

I don't think you can set up figwheel to run in your server like httpkit, it needs to use its own builtin jetty server. See

Jan K11:10:59

But of course you can run your app in httpkit with sente and also use Figwheel reloading, the servers can coexist


I'm pretty sure the handler exists in isolation in Figwheel-repl


There's comments in the source indicating that it was the intention, but web sockets and jetty required this to be a thing.


@jkr.sw i want to use sente, which i think requires some http server. i was under the impression that figwheel had to be that http server in order for it to do all the reloading goodness.


i'm also just not sure in general about all of this. web dev is all new to me. i'm new to things like http requests, middleware, routing, etc.


at this point, i got http-kit up and running and got figwheel to open the page served by it. next thing i'll work on is getting emacs integration. right now i launch figwheel via command line, but i'd rather have cider do it and i think there's a way to get that to happen


@jkr.sw @dominicm thanks for the help! it's nice to know that figwheel is supposed to be capable of this and i'm not doing something weird at a system level


on this page it says "You will need to run Figwheel as well as your application server.", but i misread it