Reputation: 99970
How can I use the 'request' node.js module on the front-end?
normally I would retrieve it like so:
var request = require('request');
but this is not possible on the front-end since require is not recognized.
What is the best way to solve this?
Upvotes: 0
Views: 719
Reputation: 2443
To use node modules in the browser you can use a library called Browserify . This allows you to work with the common module pattern as well as the you can use this package browser-request to get the features of request module
Upvotes: 2