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
Add option to disable prefixing of routes with stage name #926
Add option to disable prefixing of routes with stage name #926
Conversation
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.
Hi,
Please do not update the contributors section of the Readme, or do it in another PR :)
@dherault sorry prettier changed it. I reverted it. |
I tested out the PR and it does work.
The function |
…af/serverless-offline into disable-stage-prefix-in-routes
@soda0289 fixed it :) |
const methodColor = colorMethodMapping.get(method) ?? peachpuff | ||
const methodFormatted = method.padEnd(maxLength, ' ') | ||
|
||
return `${methodColor(methodFormatted)} ${yellow.dim('|')} ${grey.dim( | ||
`${server}/${stage}`, |
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.
I would say to maybe leave this in, and just not print it if the option isn't specified? That way people who are cool with the stage change still see the way it was formatted before.
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.
Ran into problems after updating serverless-offline to the current version. Basically offline adds the stage name 'development' or 'production' to the Lambda URLs when previous versions did not. Used to be http://0.0.0.0:3001/query
, now it's http://0.0.0.0:3001/development/query
. Seems like this PR is almost ready to go. Any chance it could be merged in the next few days?
Shipped with v6.1.0 |
@dherault is it possible to put back the ability to add a prefix to the localhost like it was version 5.x. This way I can use my existing configs and postman collections: serverless-offline:
port: 9000
prefix: ${self:service}
noAuth: true |
Feel free to open a PR :) |
Fixes #925