Node.js as script include ? OR best AWSSDK as scrip include

JK1
Giga Expert

Hey experts,

I am struggling with how to add node.js (Already added require.js and seems working) as script include. In general i need aws-sdk.js to be added as script include so i can use it to do http calls to AWS EC2 (var x = new AWS().EC2(); ........ )

Anyone achieved this? And no, I dont want to pay for Cloud Orchestration

Cheers,

Joro

1 ACCEPTED SOLUTION

Community Alums
Not applicable

You can use bower and then use the built as script include. You cant run node.js in your Rhino envionment / JVM (if you dont have access to the source code of course). As an alternative - you can use MID server for that, but I dont see much benefit of that apart from few use cases.

View solution in original post

10 REPLIES 10

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

You can't add NodeJS as a JS library, as it's not one.


Both web browsers and NodeJS run javascript scripts. The main difference is that NodeJS is a server side framework, and executes javascript code in a server and not in the environment of a web browser (client side).


So far thats true.Although it seems that AWS SDK is possible to be added as script include or UI script ( Amazon gave a choice here). So i am looking for a way to do so, without entirely cracking my head - meaning, if someone done it to share some light. Require.js is working perfect but adding awssdk is throwing me errors   - awsadk was not yet loaded.... so any suggestions are welcome 🙂


JK1
Giga Expert

AWS SDK is using node, react or browser to run. Forgot that one


JK1
Giga Expert
Hi all, I used the AWS SDK CDN and using a widget from where I execute the needed operations for the AWS EC2. This will work and for the test of the AWS offerings as well. Hope this will help someone . Cheers, Joro