6004x / jade

JAvascript Design Environment
Other
89 stars 94 forks source link

Enables module loading from files/module_name in local Jade server.py #4

Closed drhodes closed 7 years ago

drhodes commented 8 years ago

Jade wasn't loading modules from the files directory when using urls like:

http://localhost:8000/jade_local.html?modules=gates

But, it seems to work now


I was thinking of adding a POST_TYPE key to the post object in jade_local.js on line 36

// from
if (!shared) args.data = {file: filename };

// to something like
if (!shared) args.data = {file: filename, post_type: "get-module"};

So that do_POST in server.py could be more clearly broken up into distinct handlers

if post_type == "get-module":
     self.handle_get_module()
...