I use it on the client right now with Backbone.js, but I’d like to use it with node.js also.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are directions on the requirejs homepage that I found pretty useful: http://requirejs.org/docs/node.html
I also set up some examples here: https://github.com/rgarcia/node-requirejs-examples
The basic idea is that you use it just like on the client side, but for npm modules and built-in node modules, you don’t use the relative path, but rather the module name. For all of your custom modules you use the relative path.