url.parse() will give you all the information about request path and request querystring arguments so you can do all your routing in one handler. If you are making some form of UI to control this, you might also consider using AJAX so your control panel UI is not disappearing at each adjustment. There are a couple of examples on the espruino.com site.
This is one, check out the onPageRequest handler examples is the server/pages section, where all path and querystring vars are parsed in one function:-
And this one, which covers interactive UI, and makes ajax requests in background:-
© Espruino, powered by microcosm.
Report a problem