Take the 2-minute tour ×

I know that you can use JavaScript server side with node.js, but can we use jQuery for backend as well? Or will I just have to learn CoffeeScript instead of jQuery?

share|improve this question

closed as not a real question by Jim G., Yusubov, Matthieu, Walter, gnat Sep 10 '12 at 12:16


CoffeeScript is an alternate syntax for JavaScript which compiles into JavaScript. Apples and oranges with jQuery. –  gahooa Sep 9 '12 at 23:08
Why would you want to use jQuery with JavaScript if you don't need worry about the DOM? –  Jim G. Sep 9 '12 at 23:16
Why is this not a real question? It seems fine to me.] –  Toby Allen Nov 11 '12 at 19:59
add comment

1 Answer

jQuery is not a programming language but a JavaScript library, so you'd just use plain JavaScript, possibly with something like Underscore.js to add useful methods similar to e.g. $.each() or $.map().

But yes, you can use jQuery in node.js together with another package that provides a DOM.

share|improve this answer
The useful methods are available in ES5 though, and no need to worry about cross-browser issues on the server side. –  Florian Margaine Sep 10 '12 at 6:11
add comment
