Skip to content

Commit

Permalink
Update configuration file with absolute paths and URL prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
funnyzak committed Feb 22, 2024
1 parent 12a8e32 commit 0618046
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,19 @@ server:
site:
brand: Go-Gin # Site brand
description: A simple web application using Go and Gin # Site description
base_url: http://localhost:8080 # Site base URL, used for generating absolute URLs
base_url: http://localhost:8080 # Site base URL, used for generating absolute URLs, cant end with /
debug: false # Debug mode, if true, the server will print detailed error messages
log:
level: debug # debug, info, warn, error, fatal, panic
path: logs/go-gin.log # Log file path
db_path: db/go-gin.sqlite # Database path
path: logs/go-gin.log # Log file path, relative to the project root directory. Or you can use an absolute path, such as /var/www/go-gin.log
db_path: db/go-gin.sqlite # Database path, relative to the project root directory. Or you can use an absolute path, such as /var/www/go-gin.sqlite
rate_limit:
max: 100 # requests per minute, 0 means no limit
enable_cors: false # Enable CORS
enable_user_registration: true # Enable user registration
upload:
virtual_path: /upload # Virtual path, used for generating absolute URLs, must start with /
virtual_path: /upload # Virtual path, used for generating absolute URLs, must start with /, cant end with /
url_prefix: http://localhost:8080/upload # URL prefix, used for generating absolute URLs, must start with http:// or https:// or /, cant end with /
dir: upload # Upload directory, relative to the project root directory. Or you can use an absolute path, such as /var/www/upload
max_size: 10485760 # 10MB, unit: byte
keep_original_name: false # Keep original file name, if false, the server will generate a random file name
Expand Down
9 changes: 5 additions & 4 deletions config.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,19 @@ server:
site:
brand: Go-Gin # Site brand
description: A simple web application using Go and Gin # Site description
base_url: http://localhost:8080 # Site base URL, used for generating absolute URLs
base_url: http://localhost:8080 # Site base URL, used for generating absolute URLs, cant end with /
debug: false # Debug mode, if true, the server will print detailed error messages
log:
level: debug # debug, info, warn, error, fatal, panic
path: logs/go-gin.log # Log file path
db_path: db/go-gin.sqlite # Database path
path: logs/go-gin.log # Log file path, relative to the project root directory. Or you can use an absolute path, such as /var/www/go-gin.log
db_path: db/go-gin.sqlite # Database path, relative to the project root directory. Or you can use an absolute path, such as /var/www/go-gin.sqlite
rate_limit:
max: 100 # requests per minute, 0 means no limit
enable_cors: false # Enable CORS
enable_user_registration: true # Enable user registration
upload:
virtual_path: /upload # Virtual path, used for generating absolute URLs, must start with /
virtual_path: /upload # Virtual path, used for generating absolute URLs, must start with /, cant end with /
url_prefix: http://localhost:8080/upload # URL prefix, used for generating absolute URLs, must start with http:// or https:// or /, cant end with /
dir: upload # Upload directory, relative to the project root directory. Or you can use an absolute path, such as /var/www/upload
max_size: 10485760 # 10MB, unit: byte
keep_original_name: false # Keep original file name, if false, the server will generate a random file name
Expand Down

0 comments on commit 0618046

Please sign in to comment.