Skip to content
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 config expression in cds-server.md #1233

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

mika-espoo
Copy link
Contributor

Instructions are missing env property from the chain and thus have no effect. This patch fixes the documentation from this part.

@smahati
Copy link
Contributor

smahati commented Sep 5, 2024

adding @johannes-vogel and @schwma to review this PR

Copy link
Contributor

@chgeo chgeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, cds.env.server.cors = true could mean

  • Programmatic config with cds.env.server.cors = true (the literal expression, but used rarely)
  • Config through package.json etc. with cds: {server: { cors: true }} with the shorthand notation cds.server.cors:true (much more common)

Looking at our docs, it's really a mixed bag with one or the other of the above options. Whatever we currently do, there are users that will get confused.

This is why I plan to add a little 'config inspector' that would appear as a popover for such a config key showing the user all config options.

For now, the suggested fix is ok, I'd say.

@chgeo chgeo changed the title Update cds-server.md with working examples Fix config expression in cds-server.md Sep 6, 2024
@smahati smahati merged commit a0ccfa9 into cap-js:main Sep 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants