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

Added socket server wait to start option #130

Merged
merged 2 commits into from
Jul 25, 2017
Merged

Added socket server wait to start option #130

merged 2 commits into from
Jul 25, 2017

Conversation

alallier
Copy link
Owner

This allows the socket server creation to wait. This is useful for when there are are other events that happen inbetween requiring reload and start the HTTP server in an express app.

As well as ideally allowing the app initialization and socket server initialization to happen in two different spots, like requested in #67.

Note: I was quick to think we didn't need this when solving #56 with #104 but some people will need their socket server creation to wait. This will allow for that.

…low users to delay start of opening the WebSocket. This allows for reload to be used in a more async environment. Where there can be time inbetween requiring reload and starting the server
@AckerApple
Copy link

I introduced promises into my ack-reload fork and after reviewing the provided information for this issue, I think it would have been the better way to go.

As I see it reload just fires up when called and has no callback or event chaining. I feel this is why I made the choice to return a Promise.

This delay business does not look like an extra well thought out approach.. I could totally be wrong

@alallier
Copy link
Owner Author

Might want to consider adding an examples folder to show how different reload configurations should look, this configuration could use an example. Ended up opening issue #131 for this.

@alallier alallier merged commit 202e013 into master Jul 25, 2017
@alallier alallier deleted the serverWait branch July 25, 2017 14:39
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