Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Comments

fix: Server will now dynamically mount on an open port.#2772

Merged
tonyanziano merged 10 commits intomasterfrom
toanzian/auto-port
Apr 29, 2020
Merged

fix: Server will now dynamically mount on an open port.#2772
tonyanziano merged 10 commits intomasterfrom
toanzian/auto-port

Conversation

@tonyanziano
Copy link
Contributor

@tonyanziano tonyanziano commented Apr 24, 2020

Description

Currently, Composer is set to run on port 5000, which can cause it to fail if the user's machine is using that port for anything else.

This PR enables Composer to dynamically find an open port before starting the server.

NOTE: This has been changed to only apply to the production environment. The development environment will continue to mount on process.env.PORT or 5000.

This works in both server and electron-server

Task Item

closes #2770

Screenshots

Dynamically finding a port

image

Starting Composer again after already having something running on 8000

image

Copy link
Contributor

@a-b-r-o-w-n a-b-r-o-w-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link

Coverage Status

Coverage remained the same at 0.0% when pulling 6e3a6c8 on toanzian/auto-port into eadd3fa on master.

@a-b-r-o-w-n a-b-r-o-w-n self-assigned this Apr 24, 2020
@a-b-r-o-w-n a-b-r-o-w-n marked this pull request as draft April 27, 2020 20:30
Copy link
Contributor

@beyackle beyackle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, apart from the merge conflicts.

@tonyanziano
Copy link
Contributor Author

Thanks for taking a look @beyackle !

@a-b-r-o-w-n pointed out that this breaks the webpack dev server proxy that points to the server, and so I'm currently looking into how to fix that.

This PR will remain in draft until then.

@tonyanziano tonyanziano marked this pull request as ready for review April 28, 2020 23:25
@tonyanziano tonyanziano merged commit 252d43d into master Apr 29, 2020
@tonyanziano tonyanziano deleted the toanzian/auto-port branch April 29, 2020 17:38
lei9444 pushed a commit to lei9444/BotFramework-Composer-1 that referenced this pull request Jun 15, 2021
* Server will now dynamically mount on an open port.

* Removed dupe console log.

* Addressed some PR comments (refactor).

* Will only dynamically find port in production.

* Fixed missing assignment.

* Linting fix.

Co-authored-by: Chris Whitten <christopher.whitten@microsoft.com>
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.

4 participants