Node.js Express won't serve absolute URL .js files

I have two files in /public/widget, help.html and help.js

http://localhost:8084/widget/help.html

in the address bar works fine

but

http://localhost:8084/widget/help.js

is not served ('Cannot GET'), even though my express use config:

app.use(express.static(path.join(application_root, 'public')));

Any js inside an html file with relative path is served fine. (ie, if I use

  <script src="/widget/help.js"></script>

life is good; but

  <Script src="http://localhost:8084/widget/help.js"></script>

is not served. (I need the absolute url for referencing the .js in remote pages)

Here is my full Express config:

// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());
app.use(cookieParser());
app.use(morgan('dev')); // log every request to the console
//checks request.body for HTTP method overrides
app.use(methodOverride('X-HTTP-Method-Override'))    //checks request.body for HTTP method overrides
//Where to serve static content
app.use(express.static(path.join(application_root, 'public')));

I must be doing something dumb! Any ideas?

There's nothing wrong with express.

"I need the absolute url for referencing the .js in remote pages".

So you have some remote system trying to load a file from your localhost. Yeah, that won't work. "localhost" on the remote system is not the same as "localhost" on your machine. You need to give the remote system your IP address (or a domain name mapped to that IP) rather than a localhost URL.