#Node.js

0 Followers · 92 Posts

Node.js is an open-sourcecross-platform JavaScript run-time environment for executing JavaScript code server-side.

Article Rob Tweed · Feb 26 6m read

Introduction

My guess is that most IRIS developers create their applications using its native ObjectScript language or, if using an external language, then most likely using either Java, Python or perhaps C++.

I suspect that only a minority have considered using JavaScript as their language of choice, which, if true, is a great shame, because, In my opinion and experience, JavaScript is the closest equivalent to ObjectScript in terms of its ability to integrate with the IRIS's underlying multi-dimensional database. 

0
0 0
Article John Murray · Oct 6 1m read

gj :: configExplorer is a new VS Code extension integrating with Server Manager and leveraging Structurizr to produce configuration diagrams of your servers.

Here's a short introductory video.

By using the InterSystems IRIS Native API for Node.js it avoids the need for any support code to be installed on the servers. This technology choice also qualifies it for entry into the current Developer Community contest.

The initial release focuses on two aspects of server configuration:

  • Namespaces and databases
  • ECP connectivity

Suggestions for what to add next are welcome, as is general feedback.

0
0 0
Article John Murray · Oct 9 2m read

In my previous article introducing gj :: configExplorer I flagged up how an apparent bug in the Windows elements of the Native API for Node.js means it's not currently available to run in VS Code on a Windows desktop. In a comment on that article I offered a workaround, but this requires a Docker-equipped Linux host you can SSH to.

If you don't have a suitable target it's now possible to leverage your local Windows Docker Desktop. Here's how:

  1. Open a new VS Code window.
0
0 0
Article Dmitry Maslennikov · Jul 28 5m read

Overview

The typeorm-iris project provides experimental support for integrating TypeORM with InterSystems IRIS, enabling developers to interact with IRIS using TypeORM’s well-known decorators and repository abstractions. This allows a more familiar development experience for JavaScript and TypeScript developers building Node.js applications with IRIS as the backend database.

While the project implements key integration points with TypeORM and supports basic entity operations, it’s not yet battle-tested or suitable for production environments.

0
0 0
Article Dmitry Maslennikov · Jul 31 5m read

Overview I'm excited to announce the release of testcontainers-iris-node, a Node.js library that makes it easy to spin up temporary InterSystems IRIS containers for integration and E2E testing. This project is a natural addition to the existing family of Testcontainers adapters for IRIS, including testcontainers-iris-python and testcontainers-iris-java.

0
0 0
Question Ward De Backer · Oct 26, 2022

Hi,

If I test the Native api for Node.js from the documentation, I noticed (if I'm correct) all methods and calls are synchronous. By default due to the nature of Node.js, there is only one thread of execution and normally  all JavaScript methods and all calls should be asynchronous and use either a callback function (the "old way") or promises or the async/await contruct to return their result, e.g.:

  • myFunction(params, callbackFunction(response))
  • myFunction(params).then(resolveFunction(response))
  • async someFunction() {
    ​​​​​  response = await myFunction(params)
    }
13
0 716
Question John McBride · Mar 4

Hello, Does the NodeJs package work when running a node js file on windows (nodejs for windows)? I've added the package by running npm install <package location folder>

I have the following index.js file, but when running from node (windows) I get the following error. Does the NodeJs package build the output files when the package is added or does it just assume linux as the underlying os?

Error: Cannot find module './bin/winx64/irisnative.node'

0
0 0
Question Marco Blom · Jun 20, 2023

When trying the Iris Nodejs Quickstart I do get the following message in the source code:

Could not find a declaration file for module 'intersystems-iris-native'. 'C:/Nodejs Quickstart/Solutions/intersystems-iris-native/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/intersystems-iris-native` if it exists or add a new declaration (.d.ts) file containing `declare module 'intersystems-iris-native';`
ts(7016)
module"C:/Nodejs Quickstart/Solutions/intersystems-iris-native/index"
 

 the necessary npm modules are installed...

this suggested command does not solve the issue:

0
0 328
Article Evgeny Shvarov · Jul 30, 2019 2m read

Hi Developers!

This is the second post on the resources for Developers. This part is about Open Exchange

Using Open Exchange to Learn InterSystems

InterSystems Open Exchange is a applications gallery of tools, connectors, and libraries which InterSystems Developers submit to share the experience, approaches and do business. All the applications are either built with InterSystems data platforms or are intended to use for development with InterSystems data platforms.

4
0 423
Question Alin Soare · May 30, 2024

Hi, 

I almost managed to connect myself from nodejs to IRIS via intersystems-iris-native, but the connection failed. 

> const irisnative = require('./intersystems-iris-native')
> irisnative
{
  createConnection: [Function (anonymous)],
  Connection: [Function: Connection],
  Iris: [Function: Iris],
  Iterator: [Function: Iterator],
  IRISList: [Function: IRISList]
}
.....
>     var connection = irisnative.createConnection({
...     host: ip,
...     port: port,
...     ns: namespace,
...     user: username,
...     pwd: password
...     })
Uncaught Error: 8-bit servers are not supported [ERROR_8BIT_SERVER]
>

 

0
0 0
Announcement Rob Tweed · Apr 5, 2024

Hot on the heels of our announcement last week about our ultra-high-performance mg-dbx-napi JavaScript interface for IRIS, we are now pleased to announce a significant new technology - mg_web - which not only represents a new paradigm for JavaScript Web Frameworks, but also delivers significantly higher performance than even the fastest of the established Node.js Web Frameworks, whilst leveraging all the benefits of the big-three industry-standard Web Servers.

0
0 273
Announcement Rob Tweed · Sep 28, 2022

I'd like to announce the release of something really rather interesting - revolutionary in fact.  That may sound like hyperbole, but I don't think you'll have seen anything quite like this, or even thought it possible!

We've pushed out a new JavaScript/Node.js module named glsdb which you can read all about here in detail:

https://github.com/robtweed/glsdb

However, for the purposes of this announcement here, I just want to focus on one part of glsdb: its APIs that abstract IRIS (or Cache) Classes as equivalent JavaScript Objects.

7
1 376
Announcement Rob Tweed · Mar 26, 2024

You may have heard about our mg-dbx-napi interface for IRIS which provides insanely fast access from Node.js.  If you've been following recent developments in the server-side JavaScript world, you'll be excited to know that mg-dbx-napi also works with Bun.js, the latter proving to be significantly faster than Node.js for many/most purposes.

Of course, if you're a Node.js user, you'll probably wonder how mg-dbx-napi compares with the Native API for Node.js that is included with IRIS.

With all that in mind, we've created a Github repository: mg-showcase

0
0 256
Article Lily Taub · Mar 19, 2019 9m read

Intro

Most server-client communication on the web is based on a request and response structure. The client sends a request to the server and the server responds to this request. The WebSocket protocol provides a two-way channel of communication between a server and client, allowing servers to send messages to clients without first receiving a request. For more information on the WebSocket protocol and its implementation in InterSystems IRIS, see the links below.

7
3 6042
Question Rob Tweed · Oct 10, 2023

I'm using a customised IRIS Community Edition Docker Container: Node.js has been added and the Native API for Node.js directory moved to a node_modules folder in /home/irisowner.  I've changed the _SYSTEM password using the Management Portal (which connects to IRIS just fine)

If I shell into the running container and try to connect with a JS script file containing this:

        const IRISNative = require('intersystems-iris-native');

        let connectionInfo = {

          host: 'localhost',

          port: 1972,

          ns: 'USER',

          user: '_SYSTEM',

          pwd: 'secret',

2
0 192
Article Ward De Backer · Apr 22, 2017 14m read

Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. In the previous part, we created a basic front-end React application. In the second part of this article series I will show how to choose the right back-end technology for your application. You will see Caché allows you to use many different approaches to link your front-end to your Caché server, depending on your application's needs. In this part we will set up a back-end with Node.js/QEWD and CSP/REST. In the next part we will enhance our basic web app and connect it to Caché using

12
1 3340
Article Robert Cemper · Feb 10, 2021 3m read

Inspired by  @Evgeny Shvarov  and his recent article
Deploying InterSystems IRIS Embedded Python Solutions with ZPM Package Manager
I propagated the idea forward to do the same also for modules in Node.js.
The case is based on my example of IRIS Native API for Node.js

UPDATE

  • All additional required Node.js components can now be installed at runtime.   
  • Only intersystems-iris-native module is pre-installed during Docker build.
  • When Node.js is launched its Process id is displayed for debugging purpose.
  • Some optical cosmetics and runtime improvements.
2
0 557
Question Sehinde Raji · Dec 29, 2021

I am a newbie who is trying to learn how to set up a basic connection to Iris using a node js application. I am astounded at the lack of documentation there is on how to do this and even more concerning there are a few errors within the documentation. For example I am on the Native API application within the below link.

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…

6
0 310
Question Sehinde Raji · Dec 6, 2021

Newbie

I am currently running a docker image with Iris 2021.1 and I would like to install node js on to it. I have had a look at the instructions on the intersystems online learning portal and I must say its very confusing. Some of the documentation says that you can only install it on 2019. Other parts say that it doesn't matter and you can install it if you have a dev directory. I checked my dev directory and there it isn't there. Sadly this is very inconsistent. Does anyone know if it is possible to install on the above mentioned version of Iris ?

3
0 566
Article Ward De Backer · Oct 28, 2021 2m read

I wrote a step by step tutorial in the qewd-howtos repository how you can write state of the art multi-page web apps with Node.js using a QEWD-Up WebSocket/REST api back-end integrated with a mainstream web framework like NuxtJS & Vue.js. In particular with the latest NuxtJS/Vue.js frameworks, writing web applications becomes fun again, allowing you to write your applications very efficiently, hiding all boilerplate code from you.

The tutorial should be very easy to try out on your development machine and consists of two parts:

0
3 1201