I was wondering whether it's possible to use urlang in such a way that the content of the module is simply returned, instead of writing it out to a file. That way I suppose it could be combined to insert some javascript (via urlang) into an html template.
Is that something that is already possible? It strikes me as a thing that is almost implemented already with current-urlang-echo?.
I have now added urlang/string.
Wrap urlang/string around some some (urmodule ...) and you will
get a list back consisting of module names and strings with the JavaScript.
Example:
#lang racket
(require urlang)
(urlang/string
(urmodule demo-fact
(export fact)
(define (fact n) (if (= n 0) 1 (* n (fact (- n 1)))))
(console.log (fact 5))))