File tree Expand file tree Collapse file tree 2 files changed +43
-12
lines changed Expand file tree Collapse file tree 2 files changed +43
-12
lines changed Original file line number Diff line number Diff line change @@ -66,26 +66,49 @@ $ curl -X DELETE http://127.0.0.1:8080/{code}/{file_name}
66
66
$ curl -X GET http://127.0.0.1:8080/info/{code}/{file_name}
67
67
```
68
68
69
-
70
69
### Feature highlights
71
70
72
- * Dependabot configuration
71
+ *
73
72
74
73
### Run tests
75
74
76
75
```
77
76
./test.sh
78
77
```
79
- ### Configuration
80
-
81
- This project uses [ config-rs] ( https://github.com/mehcode/config-rs ) to manage configuration.
82
- #### Configure with toml files
83
- ``` bash
84
- settings
85
- ├── base.toml # default config file
86
-
78
+ #### Backend settings
79
+ *** api/settings/base.toml***
80
+ ``` toml
81
+ # Maximum upload size in megabytes
82
+ max_upload_size = 1024
83
+
84
+ # Default code length in the url
85
+ default_code_length = 3
86
+
87
+ # Default expiration time in seconds
88
+ default_expire_secs = 7200
89
+
90
+ # Server configuration section
91
+ [server ]
92
+ # Communication protocol (e.g., "http" or "https")
93
+ schema = " http"
94
+
95
+ # Host IP address for the server
96
+ host = " 127.0.0.1"
97
+
98
+ # Port number for the server
99
+ port = 8080
100
+
101
+ # File system configuration section
102
+ [fs ]
103
+ # Base directory for file system operations
104
+ base_dir = " fs-tmp"
105
+
106
+ # Database configuration section
107
+ [db ]
108
+ # Path to the database file
109
+ path = " db-tmp"
87
110
```
88
- #### Override configure with environment variables
111
+ #### Override settings with environment variables
89
112
``` bash
90
113
export PF__SERVER__PORT=8080
91
114
export PF__SERVER__HOST=127.0.0.1
Original file line number Diff line number Diff line change
1
+ # Maximum upload size in megabytes
1
2
max_upload_size = 1024
3
+ # Default code length in the url
2
4
default_code_length = 3
5
+ # Default expiration time in seconds
3
6
default_expire_secs = 7200
4
7
5
8
[server ]
9
+ # Communication protocol (e.g., "http" or "https")
6
10
schema = " http"
11
+ # Host IP address for the server
7
12
host = " 127.0.0.1"
13
+ # Port number for the server
8
14
port = 8080
9
15
10
16
[fs ]
17
+ # Base directory for file system operations
11
18
base_dir = " fs-tmp"
12
19
13
20
[db ]
14
- path = " db-tmp"
21
+ # Path to the database file
22
+ path = " db-tmp"
You can’t perform that action at this time.
0 commit comments