-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
change exports to a factory #7
Conversation
Thank you for your work! |
Merged! |
Published on npm with tag |
Thanks! I was thinking about this last night, I will want it to ask for a password (if required) when you first run the server, rather than when it's installed. If you're open I'll try to make that change next weekend. |
The password is the sudo password I suppose. |
Yes, exactly. With a message "Please enter your password to enable https" or something similar. |
Make sense. Can you implement that? I also open an issue #8 that I would like to implement sooner or later. If it you would like to take a look, I think it could be easier to implement with your proposal edits, otherwise I'll implement myself when I have time. |
PR Details
This makes the exports of the module a factory function rather than exporting app directly. Doing this brings the API in line with express and allows you to create more than one app in a node process.
This is a breaking change, but could be converted to a non-breaking change by continuing to export the app and adding the factory function to it. I decided against that because I thought people would expect it to work like express.
Motivation and Context
I maintain a development server that allows you to start multiple http servers with webpack-dev-middleware using a single command. The use cases are:
How Has This Been Tested
Unit tests pass. I am using it locally in my dev server.
Types of changes
Checklist