Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Fix express.js port recognition #178

Merged
merged 6 commits into from
Apr 25, 2023

Conversation

thepetk
Copy link
Collaborator

@thepetk thepetk commented Apr 13, 2023

What does this PR do?

Updates the port recognition logic for express_detector. Moreover, it adds an additional check for cases that we use a variable which takes its value after the usage of the logical OR operator (e.g. var PORT = process.env.PORT || 8080). The new logic for the func getPort of the detector will be:

image

Note that all other detectors (angular, next, nodejs, nuxt, reactjs, svetle, and vue) are not using the same logic in order to perform port recognition, that's why this workaround is not global for nodejs detectors.

Which issue(s) this PR fixes:

This PR is part of the solution and fixes #146

@thepetk thepetk force-pushed the fix_node_port_recognition branch from 6198aab to 580dbf2 Compare April 14, 2023 10:03
@thepetk thepetk merged commit baf25f6 into redhat-developer:main Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alizer should be more resilient when detecting ports in a component
2 participants