-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fix #52, #21 and #35 #64
Conversation
28e9059
to
405f508
Compare
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 does indeed fix #21 (it was not working prior to this without a different fix). Also confirmed http/https on custom ports are working as expected.
Looks like test.ejs, schema and utterances are working, too, using GET.
Thanks for checking it out @rickwargo. I'll wait for @tejashah88 to do a code review of this and the upstream PR and merge. We should get things sorted out with a release next. Do you have anything blocking and not working after this? |
@dblock on the surface it appears all good, but haven't had the time to dig under the covers. i'll have more time tomorrow. |
f84d077
to
83e38ac
Compare
index.js
Outdated
|
||
// TODO: change this to make sure it doesn't affect other non-Alexa services/apps | ||
// Issue #35: https://github.com/alexa-js/alexa-app-server/issues/35 | ||
self.express.use(bodyParser.urlencoded({ extended: true })); |
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.
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.
Yes, but that issue is still open, I didn't get a chance to write a test for that and fix it (and I definitely don't want to change it here without a corresponding test). There were tabs->spaces changes here so it looks like this code has changed, but it has actually not. You can look at the diff without spaces, https://github.com/alexa-js/alexa-app-server/pull/64/files?w=1
I've updated this with a fix for #35. Now that we're mounting body-parser inside alexa-app, we can just remove it from alexa-app-server. See alexa-js/alexa-app#155 for details. @tejashah88 this is ready for you to merge |
@@ -19,7 +19,7 @@ | |||
}, | |||
"license": "MIT", | |||
"dependencies": { | |||
"alexa-app": "^2.4.0", | |||
"alexa-app": "alexa-js/alexa-app", |
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.
Once we've released 2.4.0 I'll change this and make a release of alexa-app-server.
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 changes look good so far. I'll wait for @rickwargo to say more about this before merging.
Sorry, @tejashah88, didn't get a chance to review today. I will have time in the morning. |
Looks good, however bodyParser.urlencoded() is now removed via alexa-app#152 - found this testing a form post hosted in alexa-app-server. I believe this was previously handled - does it need to be handled or should it be called out in the README? |
One (simple) formatting suggestion is to remove trailing slashes from the |
I think the urlencoded bodyparser is not the business of these libraries. I've added a note to UPGRADING in alexa-js/alexa-app#158. Opened #68 for the slashes thing, it's cosmetic unless I'm missing something. |
Looks like everyone is happy with this, merging. Thanks for your help! |
Yep @rickwargo, I documented this change in UPGRADING, both here (#69) and alexa-app (alexa-js/alexa-app#158). |
@mreinstein correctly calls that #54 fixes #52, #21 and partially #35. What this does is use alexa-app's
express
method instead of cooking our own, plus a test that right now would hang on master and no longer hangs in this branch.Replaces #56 on top of #60.
This is dependent on alexa-js/alexa-app#150, I didn't find a better way to get
?utterances
,?schema
andpreRequest
andpostRequest
support without moving this logic upstream to alexa-app.