3 ms·
ah, i dunno, compare (defroutes app (GET "/" [] "<h1>Hello World</h1>")) and @app.route('/hello') def hello(): return "hey" seems about equiv
by auvrw 13y ago
ah, i dunno, compare
(defroutes app
(GET "/" [] "<h1>Hello World</h1>"))
and
@app.route('/hello')
def hello():
return "hey"
seems about equivalent.
EDIT: except for the inherent awesomeness of s-expressions (>__> ?)
- moomin 13y agoIt's worth pointing out that in the first case what you get is a pure function that you can test without any mocking whatsoever. Sinatra's lovely, though.
- auvrw 13y agoheh, i wouldn't know anything about ruby. that was flask, of course. the promise of clojure to me (aside from liking lisp) is similar to that of node: only having to maintain one codebase for both client and server sides. also, really should say thanks to the author of the original article. returned here today when i realized that korma doesn't create tables and i'll need .... lobos, apparently, which was not mentioned in any of my searches for such a library. why didn't this submission get more upvotes?