-
Notifications
You must be signed in to change notification settings - Fork 47
docs: Fix routing sample #26
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
base: master
Are you sure you want to change the base?
Conversation
The routing sample doesn't work. This solution works. however I'm not sure your intent. Feel free to reject if it is not good.
Codecov Report
@@ Coverage Diff @@
## master #26 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 67 67
Branches 18 18
=====================================
Hits 67 67 Continue to review full report at Codecov.
|
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.
Please don't add the unnecessary hello
part
// Create express app as usual | ||
const app = express(); | ||
app.get("/api/:foo/:bar", (req, res) => { | ||
app.get("/api/hello/:foo/:bar", (req, res) => { |
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.
Why are you adding hello
?
"direction" : "in", | ||
"name" : "req", | ||
"route" : "foo/{bar}/{id}" | ||
"route" : "hello/{foo}/{bar}" |
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.
Do you mean {foo}/{bar}
?
In my environment, the basic sample doesn't work. This solution works. However, I'm not sure what do you intent. Feel free to close this if I made a mistake.