Skip to content

Commit

Permalink
Merge pull request #153 from myyrakle/docs/#149
Browse files Browse the repository at this point in the history
[#149] application.properties 문서화
  • Loading branch information
myyrakle authored Sep 30, 2024
2 parents da484e4 + a23213d commit 41a4f3c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions rupring/src/application_properties.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
/*!
## Intro
- application.properties is a configuration method influenced by spring.
## How to find it
- The rupring program searches the current execution path to see if there is a file called application.properties.
- If it does not exist, application.properties is searched based on the directory of the current executable file.
- If it is still not there, load it with default values ​​and start.
## Format
- Similar to spring, it has a Key=Value format separated by newlines.
## Special Options
| Key | Description | Default |
| --- | --- | --- |
| environment | The environment to run in. | dev |
| server.port | The port to listen on. | 3000 |
| server.address | The address to listen on. | 0.0.0.0 |
| server.compression.enabled | Whether to enable compression. | false |
| server.compression.mime-types | The mime types to compress. | text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml |
| server.compression.min-response-size | The minimum response size to compress. (byte) | 2048 |
| server.compression.algorithm | The compression algorithm to use. | gzip |
*/

use std::collections::HashMap;

#[derive(Debug, PartialEq, Clone)]
Expand Down
4 changes: 4 additions & 0 deletions rupring/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,10 @@ pub fn get_user(request: rupring::Request, _: rupring::Response) -> rupring::Res
return rupring::Response::new().text("OK".to_string());
}
```
# Application Properties
- rupring provides various execution options through a special configuration file called application.properties.
- Please refer to the corresponding [document](crate::application_properties) for more details.
*/

pub(crate) mod core;
Expand Down

0 comments on commit 41a4f3c

Please sign in to comment.