Save
Last Comment

Explainer

Initial request is received by an NGINX server

A reverse proxy is set up to relay any requests starting with /slimjim/ to localhost:8080

A small javascript server running in node.js and express runs on port 8080

The script is launched at boot using PM2

I ran into some issues : I had a preprocessor (app.use(...)) that called next, but forgot to add the request and response parameters. This was a lame attempt to fix a bug, but it turned out that the bug was the formatting of the NGinx config file.

location /slimjim/  {
  proxy_pass http://localhost:8080/; <- forgot the trailing slash here...