-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
express server support #872
Conversation
Looks good to me. I'd like @herom to weigh in as well. |
if (!self.authorizeConnection(req)) { | ||
res.end(); | ||
return; | ||
if(typeof server.route === 'function' && typeof server.use === 'function'){ |
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.
is there any other possibility to check if the passed in server instance is an express
app or is this check reliable from at least 4.x upwards?
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.
instanceof
wont work in this case. This will work 4x onwards as use
and route
are most commonly used express methods.
Current check gives us an another advantage - we have express
as dev dependency only :)
@herom have made recommended changes. Please review. |
Thanks a ton @prasunsultania - LGTM 👍 One last thing: could you please open a PR and update our |
I will open a separate PR after updating docs. |
supporting express server so, that it is easier to use node-soap in an existing express server without affecting other routes.
It supports middleware for body parsing like body-parser as well.
Please see the tests included in commit.