Script name in NodeJS

Hi,

I know that I can get the name of the script being executed by a PHP server (i.e., the API), by referencing the variable $_SERVER.PHP_SELF

Does anyone know if there an equivalent way to obtain the name of the API (like a variable that allows the server action API to know its own name) when using NodeJS?

Many thanks!

You can see all $_SERVER vars by creating a quick set value in an api and set its output to $_SERVER.

What you are probably looking for is $_SERVER.PATH_INFO

1 Like

This is great. Thank you so much!
Btw, there’s also $_SERVER.URL that keeps the same value as $_SERVER.PATH_INFO.

Alex