Is there a clever workaround to for using the RapydScript -x path to run .pyj scripts which import JS libraries using 'require'?
I can compile something like this to JS using RapydScript and then run it in node:
def request_handler(request, response):
response.end( "<html><h1>Hello World</h1></html>" )
JS("""var http = require('http');
var server = http.createServer(request_handler);
server.listen(PORT, function(){
console.log("Server listening on: http://localhost:%s", PORT);
But I can't run it directly with RapydScript -x, which complains that _require_ is not defined, even though (at least as understand it) RapydScript is running inside of node itself. Is there a switch or flag I'm missing? or do I just need to bite the (not so terrible) bullet of compiling and running in two lines?