Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the default port with 8080 #352

Merged
merged 4 commits into from
Jan 21, 2023
Merged

Replace the default port with 8080 #352

merged 4 commits into from
Jan 21, 2023

Conversation

sansyrox
Copy link
Member

@sansyrox sansyrox commented Jan 9, 2023

OSX has some service running on port 5000 by default. It makes it annoying to work on Robyn to keep changing the default port number all the time.

Description

This changes the default PORT of Robyn.

@netlify
Copy link

netlify bot commented Jan 9, 2023

Deploy Preview for robyn canceled.

Name Link
🔨 Latest commit d4b0c30
🔍 Latest deploy log https://app.netlify.com/sites/robyn/deploys/63cbfea06f78860009021d32

@sansyrox sansyrox marked this pull request as ready for review January 9, 2023 21:41
OSX has some service running on port 5000 by default. It makes it
annoying to work on Robyn to keep changing the default port number all
the time.
@sansyrox sansyrox requested a review from AntoineRR January 19, 2023 15:41
@sansyrox
Copy link
Member Author

Hey @AntoineRR ,

Can you have a look at this PR?

Copy link
Collaborator

@AntoineRR AntoineRR left a comment

Choose a reason for hiding this comment

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

Hi @sansyrox !

This looks fine to me and runs well on my linux machine. I just noticed there are a few places where port 5001 was used in the tests. Do you want to keep it like this? Maybe we should replace it with 8081 for consistency?

@@ -12,7 +12,7 @@
# create robyn.env before test and delete it after test
@pytest.fixture
def env_file():
CONTENT = """ROBYN_PORT=8080
CONTENT = """ROBYN_PORT=8081
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why using 8081 here?

Copy link
Member Author

Choose a reason for hiding this comment

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

@AntoineRR , as I wanted to test it on something other than the default port. Given that 8080 will be the default port from now on.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just noticed there are a few places where port 5001 was used in the tests. Do you want to keep it like this?

Sure, this sounds like a good idea. 😄

@sansyrox
Copy link
Member Author

@AntoineRR , all done. 😄

Copy link
Collaborator

@AntoineRR AntoineRR left a comment

Choose a reason for hiding this comment

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

Sorry I forgot to add one comment about the typing. Otherwise this LGTM, approved 😉

robyn/robyn.pyi Outdated
@@ -21,6 +21,10 @@ class Response:
headers: dict[str, str]
body: str

def set_file_path(file_path):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add str typing to the parameter here?

Copy link
Member Author

Choose a reason for hiding this comment

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

@AntoineRR , yep sure 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

done!

@sansyrox sansyrox merged commit 3df44ba into main Jan 21, 2023
@sansyrox sansyrox deleted the test-suite-fix branch January 21, 2023 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants