Node.js server


This is a lightweight implementation of a Node.js HTTP/S server. HTTP clients and unauthorized HTTPS clients can access functions in "Read-Only" mode, with authorization being achieved through the user who ran the node.js server's .k5login. The server is extended through the use of modules, which can contain both client-side and server-side code. The server side code is brokered through a module.js file, but this file may include other dependencies in the module/server directory. The node.js server will serve requests for module/*.html, module/*.css, or module/*.js files out of the module/client directory. The client initially loads client.html, in the same folder as serverbase.js, which should be modified to contain links to the client interfaces for the modules.


Cloning the artdaq-utilities repository into a local directory achieves most of the necessary installation. However, certain system packages will need to be installed. As root:

yum install yum-conf-epel #If you haven't already
yum install nodejs npm

Next, from your artdaq-utilities-node-server folder, run:

And you're ready to go!


Version History

  • Release Notes 1.02.01 (24-Jul-2020) -- Updated cetbuildtools
  • Release Notes 1.02.00 (23-Mar-2020)
  • Release Notes 1.01.07 (22-Nov-2019) -- Removed dependency on artdaq_database. Product is now built noarch.
  • Release Notes 1.01.06 (08-Oct-2019) -- artdaq_database updated to v1_04_77
  • Release Notes 1.01.05a (24-Sep-2019) -- artdaq_database updated to v1_04_76
  • Release Notes 1.01.05 (26-Jul-2019) [artdaq_database v1_04_74]
  • Release Notes 1.01.04 (30-Apr-2019) -- artdaq_database updated to v1_04_71
  • Release Notes 1.01.03 (07-Mar-2019) [artdaq_database v1_04_70]
  • Release Notes 1.01.02 (05-Feb-2019) [artdaq_database v1_04_69]
  • Release Notes 1.01.01c (25-Oct-2018) -- artdaq_database updated to v1_04_67
  • Release Notes 1.01.01b (27-Sep-2018) -- artdaq_database updated to v1_04_61
  • Release Notes 1.01.01a (07-June-2018) -- artdaq_database updated to v1_04_56
  • Release Notes 1.01.01 (07-May-2018) -- artdaq_database updated to v1_04_54
  • Release Notes 1.01.00 (16-Apr-2018) [artdaq_database v1_04_48]
  • Release Notes were not written for versions 1.00.10 - 1.00.14
  • Release Notes 1.00.09 (07-Aug-2017) [artdaq_database v1_04_26]
  • Release Notes 1.00.08 (01-Jun-2017) [artdaq_database v1_04_22]
  • Release Notes 1.00.05 (10-Feb-2017) [artdaq_database v1_04_04]
  • Release Notes 1.00.04 (13-Jan-2017) [artdaq_database v1_03_19]
  • Release Notes 1.00.02 (08-Nov-2016) [artdaq_database v1_03_16]
  • v1_00_00: Separated into node-server subrepository.
  • v0.4: base module added with generally-useful client-side code (i.e. d3.js, jquery.js), and server-side utilities (base_module.js).
  • v0.3: Import from pcie_linux_kernel_module, supports "modules" containing related code. Expects to see *_module.js file in modules/<modulename>/server directory that contains the following functions:
    • MasterInitFunction() -- Performs one-time initialization apart from module construction. Can also be used for persistent, reoccurring tasks that only one thread should run.
    • module.exports = function (module_holder) { module_holder[<modulename>] = <some object>; } Here, <some object> should contain all of the functions that will be called using the <modulename>/<functionname> syntax, preceded by GET_, RO_ or RW_, as applicable
  • v0.1: Initial version, supports `cat /proc/stat`, running iostat, or running command-line scripts from the ./safe/ directory.

Node.js Server Utilities

Swig v3.0.2 UPS Product
Making server.crt and server.key
HTTPS tunneling Proxy