-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: retries if default port is occupied #64
Conversation
I will add tests soon then this will be ready for merge |
No, I think this way is much better than having a prompt. |
P.S. Arrow is suchaa cutieeeee!!! When you all celebrate his birthday or any other day for him, is it called Arrow Function :p ? |
Re P.S. : haha, his birthday is on 7th July My brother actually named him from the TV series Arrows. First time I have linked him with js arrow fns because of you 😅. |
Hold up, we have no tests for dev server 😅 |
oh yes lol forgot. Here #35 |
I will test this code manually tomorrow and we can write tests for dev-server after that. Any idea on how we can test it though? |
@saurabhdaware I will add test for the whole deal, don't worry now. This one is on me now |
Woah! That will be huge help 🎉 |
dec1b23
to
3e37ff1
Compare
Ok, this is ready for review now. I have added tests for http server and the retry logic. |
@@ -97,7 +101,7 @@ describe("utils/abell-fs.js - Abell's file system", () => { | |||
}); | |||
|
|||
after(() => { | |||
process.chdir('../../../..'); | |||
process.chdir(__dirname); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These path changes were very unreliable so I had to refactor them
Opened #72 for adding tests for wss |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THIS. IS. AMAZINGGGGGGGG 🎉 I was soo complicating things lol using fetch
is such a good idea!
Yay, first PR to abell. More to come :)
What type of PR is this?
Description
Closes #61
This PR recursively find the next available port if default port is used until 3 levels. It doesn't run this for non-default ports as user has explicitly specified the port there.
Screenshots:
Port 5000 is avaliable
Port 5000 taken
Port 5000, 5001 and 5002 taken
Port 5000, 5001, 5002 and 5003 taken(case which exceed the max retries)
Open questions:
Added unit tests?
(I will add them tomorrow, too sleepy right now)
[optional] Random GIF to +1 someone's day
Here is my dog's picture(name is Arrow :) )