-
In NodeJS, I understand that by creating a Any tips? 🤔 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hey! For that you can use query strings, it's not something that is supported by path segments currently. |
Beta Was this translation helpful? Give feedback.
-
Try creating a file Another alternative is to create a file without path segments, such as {
"rewrites": [
{ "source": "/v1/:first/:last", "destination": "/api/handle-name" }
]
} |
Beta Was this translation helpful? Give feedback.
-
@styfle It's possible to use the same structure but passing from path segments, but using Example: {
"routes": [
{ "src": "/orders/(?<order>someregexhere)/update", "methods": ["POST"], "dest": "/api/orders/[order]/update.js?order=$order" }
]
} The example above don't redirect the This one also don't insert into {
"routes": [
{ "src": "/orders/(?<order>someregexhere)/update", "methods": ["POST"], "dest": "/api/orders/[order]/update.js" }
]
} |
Beta Was this translation helpful? Give feedback.
Try creating a file
/api/[firstname]/[lastname].js
to create multiple path segments.Another alternative is to create a file without path segments, such as
/api/handle-name.js
, and then add anow.json
file with rewrites like the following: