Tuesday 6 June 2017

Can I use JavaScript APIs in Node.js?

The APIs are already built and they are in traditional JavaScript. The API does not export functions or nicely prepare it for use in Node.js. Can I include these APIs in Node.js? I essentially want to do what html does when one says :

<script type="text/javascript" src="https://desiredAPI.com/stuff.js"></script>

Is this possible in Node.js? Does anyone have insight into common problems that come up when trying to handle this using eval()? Is there a better way?



via Joseph Shapiro

No comments:

Post a Comment