lihaoyi / workbench

Tooling around scala-js
234 stars 56 forks source link

Use workbench with another server #18

Closed olivierguerriat closed 8 years ago

olivierguerriat commented 9 years ago

I use a Spray server to serve the HTML and static files but I would like to use the workbench plugin (refresh on packageJS & console forwarding) in the same way I use LiveReload for CSS changes.

I tried to include <script type="text/javascript" src="http://localhost:12345/workbench.js"></script> in the HTML, but it doesn't work well in Chrome and not at all in Safari. The Access-Control-Allow-Origin header seems to cause troubles.

Is that a supported use case? How should I do it?

lihaoyi commented 9 years ago

I haven't tried, but it could probably be made to work. If you're willing to put in some elbow grease, you could try cloning the repo and fiddling with workbench's own server (also Spray!) to make the CORS things like up properly.