Backbone.js - Simple CORS echo server

I'm trying to learn Backbone.js and thus follow tutorials.

In particular, I'm following a tutorial by Thomas David (founder of Backbone Tutorials).

The problem is that the basic server he gives on his GitHub doesn't work.

So my question is the following :

  • Does anyone have a bare-bone Node.js CORS-enabled echo server that could work with Backbone.js ?

I only want the server to be able to answer certain requests with JSON strings (like a REST server) so that I can concentrate on learning Backbone.js.

Thanks in advance !

I wrote an echo-server in node.js specifically for issues like this: https://github.com/monsur/echo-server. Check the "samples" directory for an example of how to test CORS requests.