How do I develop it?



  • I've checked it out, but there are a bunch of issues trying to run it locally. I got around the CORS problem by using the Charles proxy, but now it's complaining about not being able to write 0:/dwc.json.

    Is there a set of instructions on how to run it locally for dev?



  • The github repository is structured so that a copy of it, on a local file system, loads into a browser via "file://" and works.

    The "build.sh" script "repackages" the various files and directories into a structure that works when fetched from the webserver built into the Duet. Other than any CORS concerns, this same structure should also work when served from anywhere. "reverse engineering" (really, just looking) at the build.sh tells you a lot...

    All above was true for the "old" DWC the last time I explored it... don't know for sure if it is or isn't true of the "2.0" structures.



  • @danal it does work when served locally, except that the interface won't actually interact because it's trying to run a bunch requests for status, connect, download, etc. Those will never succeed because there is nothing to respond.

    I did set up Charles proxy to Map Remote to my running Duet for those queries, except one just wouldn't work, I'm suspecting the 4 connection limit on the Duet was the case. I ended up blacklisting that one request and everything started working.

    It'd be great if the system could run in offline mode, or even better, a simple server side code that runs locally that mocks the Duet.



  • The "old" one contained a few lines of code to recognize that it was being run from local and prompt for the name/IP of the Duet with which it should connect. It worked, from "file://" or any other server.

    I have not tried the new one locally (and/or from an arbitrary server).

    Try the old one, locally.



  • @danal ah, ok. I was serving it from the internal IntelliJ sever. Thanks


Log in to reply