-
Notifications
You must be signed in to change notification settings - Fork 320
New Configuration Pages #630
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: main
Are you sure you want to change the base?
Conversation
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
</link-summary> | ||
|
||
When running a Ktor server application, you might need to configure Ktor and application-specific configuration. | ||
These kinds of configurations are unrelated to [Engine Configuration][server-engines.md] and allow configuring Ktor |
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.
What do you mean by "configuring Ktor itself"? Is it different than server configuration?
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 is "Engine" configuration which is specific to the engine used "Netty", "CIO", etc.
Then there is Ktor specific configuration such as "ktor.development", "ktor.deployment.watch", "ktor.application.id", etc. Some overlap such as port
and host
.
These are currently split from the framework point of view, and I kept them on server-configuration
because that's where they lived. I should re-add Predefined properties
at the bottom of the page though.
<toc-element topic="server-configuration-file.topic" | ||
accepts-web-file-names="configuration.html,configurations.html,environments.html,configuration-file.html"/> | ||
<toc-element topic="server-configuration.md" | ||
toc-title="Server Configuration" |
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.
It's confusing that the TOC title is "Server Configuration" but the topic one "Application Configuration". If I understand correctly, they are separate concepts, so we should either call this "Configuration" or "Server and application configuration". Wdyt?
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 is probably oversight. I thought Server and application configuration
was too long for the menu 😅
I think Server configuration
, Application configuration
, or Server and Application Configuration
all work.
Server configuration
implies both "ktor server" and "my custom server logic", similarly for Application
it refers to my own Application
and the Ktor Application
class.
I personally have no strong opinion. It could also be moved "Ktor Configuration" to "Engines" but then we'd have to change the name and I think that might be move confusing.
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.
Alright then, I think it makes sense to keep the Ktor configurations here as opposed to the Engines topic.
Maybe @meilalina can help with the title :)
|
||
Ktor supports loading [HOCON](https://github.com/lightbend/config/blob/master/HOCON.md) and [YAML](https://yaml.org) | ||
configuration files out-of-the-box. | ||
If you use [EngineMain](server-create-and-configure.topic#engine-main) to start a server, Ktor will automatically load |
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 think this deserves a sub-section, such as "Supported formats", now that the content is merged in one topic.
We also previously mentioned that the files need to be located in the resources directory. Is this no longer a requirement?
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.
We also previously mentioned that the files need to be located in the resources directory.
Great point! This should still be included.
Good point about the sub-section!
This PR is a draft for new configuration pages. There is a lot of duplication, which seems to send you in a circle if you follow references. This PR attempts to simplify the configuration pages, and aims to add new practical information for building Ktor applications.
tip