Fork me on GitHub

Hi all, I’m struggling with a concept and was hoping for a little bit of help in terms of configuration. I have a cljs-client and a cljs-server (node, express). The client is fairly straight forward when running with figwheel as it just gets served up at localhost:3449. I built the server following this pattern: and it also correctly is watched by figwheel and hot reloads my changes to the api port (3000). The problem I’m having is that because my server runs on a different port than my client I cannot make requests to that server from the client without CORS errors. So the question is, is there anyway to bind/proxy the cljs-server under the 3449 port as well? Am I thinking about this wrong? Thanks!


@comamitc: what about adding CORS headers to your server? that sounds like a quick solution to me


The problem I have with adding CORS to my server is that this isn’t really the way I would run it in production. (with figwheel in particular) So I’d be adding CORS for dev only, which seems odd.


@comamitc: the simple solution is to serve you app html and assets from node. Everything will work then.