-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathHelloWorld.js
30 lines (24 loc) · 1.01 KB
/
HelloWorld.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
PURPOSE: Makes a connection to an instance of InterSystems IRIS Data Platform.
This example also stores data natively into your instance of InterSystems IRIS.
*/
const irisnative = require('intersystems-iris-native')
function main()
{
// Credentials to connect to InterSystems IRIS database
var ip = "localhost"
var port = 51773
var namespace = "USER"
var username = "SuperUser"
var password = "SYS"
// Create connection to InterSystems IRIS
const connection = irisnative.createConnection({host: ip, port: port, ns: namespace, user: username, pwd: password})
console.log("Hello World! You have successfully connected to InterSystems IRIS.")
// Create an InterSystems IRIS native object
const irisNative = connection.createIris()
// Store data natively into a global using the InterSystems IRIS native object
irisNative.set(8888, "^testglobal", "1");
globalValue = irisNative.get("^testglobal", "1");
console.log("The value of ^testglobal(1) is " + globalValue);
}
main()