Skip to main content
Skip table of contents

Integrating NodeJs with Gateway server

To start Nodejs inside a gateway server, perform the following actions.

  1. Open the gateway server profile in eStudio.

  2. Go to Fiorano > Esb > NodeJs > NodeJs and enable the EnableStart property. 

    Ensure that the Gateway server is not running.

    By default, a script file which starts a webserver is configured for 'ScriptFilePath' at $FioranoHomeInstaller\esb\samples\nodejs\httpserver. The path can be changed by editing the ScriptFilePath property and the script file can be customized if required by accessing the file from the saved location.


    Figure 1: Enabling EnableStart property

  3. Press CTRL+S or click the Save 
    icon to save the profile.
  4. Go to Installer\extlib\j2v8 and retain only the jar related to the corresponding OS after deleting other OS-related jars.

    Stop the AMS server if it is running in the same system where AGS is running.

  5. Create a folder named "jni" at Installer\esb\server\bin folder.
  6. Extract the j2v8 jar and copy the following file to the jni folder.
    1. Windows: .dll
    2. Linux: .so
    3. mac: .dylib
  7. Delete the extracted folder.
  8. Start the peer server and check the following statement in the peer console which acknowledges that the Nodejs server is started inside the peer server:

    CODE
    Started NodeJs Http server on port 8000


    Figure 2: Acknowledgement message appearing on the gateway server console

  9. To check if the connection is established, invoke the following URL in the browser, which ideally gives "Hello World" as the response:

    CODE
    http://localhost:8000/


    Figure 3: Testing the connection

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.