MIT SIPB Script Services for Athena

Does support Node.js?

Scripts supports Node.js as a runtime environment, but most existing Node.js apps are not compatible with a multi-server setup like Additionally, does not support using the common http.createServer function. Read below to find out how to write or adapt Node.js code to run on

Scripts can be used to run your own Node.js code! To begin, you probably want to ensure to have your site run on Fedora 30.

Using typical Node conventions, you can usually replace your use of the http package with node-fastcgi and install the code as an executable file whose name ends with .fcgi.

See below for an example index.fcgi:


var fcgi = require('node-fastcgi');

const express = require('express'),
      app = express(),
      http = fcgi.createServer(app);

app.get('/', function (req, res) {
   res.send("Hello World");


Naturally to do this, you need to install the node-fastcgi library. To do so, first you need to make sure you have a writable npm folder for your locker as follows:

% add consult
% mkdir -p /mit/lockername/.npm
% fsr sa /mit/lockername/.npm daemon.scripts write

From here, you can now ssh into scripts to install whatever packages you need (show for node-fastcgi):

% ssh -k
% cd myapp
% npm i node-fastcgi

If you get an “Internal Server Error” despite having valid code, make sure that you have marked the script executable with chmod +x index.fcgi. You can diagnose your error by attempting to run your script directly at the prompt:

% ssh -k
% cd myapp
% ./index.fcgi
© 2004-2020, the SIPB project.
These pages may be reused under either the GFDL 1.2 or CC-BY-SA 3.0.
Questions? Contact

You are currently connected to