> This is one of the things that node.js is really good at
Why does every simple task motivate people to show some kind of "hello world" code in their favorite language and framework?
This web service is just a tiny exercise that is easily realized with a few lines in any language (even C or Bash) using any web server. In particular, I don't see in how far this code demonstrates the strengths of node.js.
Perhaps because, though Sinatra is actually one of my favorite frameworks, it doesn't work very well for this. The author comments that it's limited to 10 seconds because each connection is handled by a blocking Thin. Eventmachine could also solve this problem, in a similar amount of code.
And I was just pointing out that this happened to be the official hello world for node.js.
Comments
> This is one of the things that node.js is really good at
Why does every simple task motivate people to show some kind of "hello world" code in their favorite language and framework?
This web service is just a tiny exercise that is easily realized with a few lines in any language (even C or Bash) using any web server. In particular, I don't see in how far this code demonstrates the strengths of node.js.
Perhaps because, though Sinatra is actually one of my favorite frameworks, it doesn't work very well for this. The author comments that it's limited to 10 seconds because each connection is handled by a blocking Thin. Eventmachine could also solve this problem, in a similar amount of code.
And I was just pointing out that this happened to be the official hello world for node.js.
shmeedog wrote a server in eventlet that solves the blocking thin problem.
Amusingly, my involvement came from showing shmeedog how nice his service would look in Sinatra versus WSGI.