Why can't I discover my NodeJS application?

Ben Gayson
Published: 31 March 2026Last updated: 31 March 2026
Share:

You can sometimes have issues where discovering an application doesn't work. Below will be the reasons as to why this sometimes doesn't work and how to resolve the issues.

The port is not specified within the .env file. 

The most common issue that's seen is that the .env file doesn't have the port specified. If the port is not specified, then the discovery tool can't then configure the application so that the requests are proxied to the correct port on the server. This also does naturally mean a .env file is required for the application to be discovered. You also need to ensure the port being used for your application isn't one of the standard ports such as port 80 as this won't allow it to run. 

There is no ecosystem.config file. 

Quite often, the app cannot be discovered as there is no ecosystem.config file. This file is needed as it's where the discovery tool gets the name of the app from. An ecosystem.config file should look like the following. 

module.exports = {
  apps: [
    {
      name: '20i-docs-api',
      cwd: '/home/virtual/vps-11111/1/1111aaa/public_html/api',
      script: 'npm',
      args: 'start',
      env: {
        NODE_ENV: 'production',
      },
      exp_backoff_restart_delay: 100,
    },
  ],
};

Note: you will have to change the above code so that the name is the name of your application, and also the "cwd" to the path to your own application. 

If you have any questions or issues regarding this, please contact our support team, who will be more than happy to assist you further.