3 ms·
http://github.com/ober/thinatra http://github.com/ober/thinatra (get "/hello/:person1/:person2" "Hello #{person1} and #{person2}") http://localhost:8021/h
by pavelpanev2 14y ago
http://github.com/ober/thinatra http://github.com/ober/thinatra
(get "/hello/:person1/:person2"
"Hello #{person1} and #{person2}")
http://localhost:8021/hello/Jack/Jill http://localhost:8021/hello/Jack/Jill
"Hello Jack and Jill"
Much nicer imho than many of the ugly lisp ways.
And all in Emacs Lisp.
- gcr 14y agoThat's a great text templating engine, but how does it handle the structure of HTML? Though our lisp solutions might be uglier than that, they: - Are guaranteed to automatically produce perfect, valid HTML (or XML in my case), - Automatically escape user-supplied input - Make it very easy to generate lots of repetitive elements, or conditional elements, like other template languages. Maybe I'm misunderstanding the spirit of your post? It seems like thinatra excels at the "routing requests from varying URLs" part, which solves a slightly different problem than the code we posted (racket for example provides a default path of http://localhost:40986/servlets/standalone.rkt http://localhost:40986/servlets/standalone.rkt -- definitely not what you would want)