|
@@ -12,6 +12,11 @@ name = "benchmark"
|
|
|
# Friendly description of application
|
|
|
desc = "aah framework web application"
|
|
|
|
|
|
+# Configure file path of application PID file to be written.
|
|
|
+# Ensure application has appropriate permission and directory exists.
|
|
|
+# Default value is `<app-base-dir>/<app-binary-name>.pid`
|
|
|
+#pid_file = "/path/to/pidfile.pid"
|
|
|
+
|
|
|
# -----------------------------------------------------------------
|
|
|
# Server configuration - HTTP
|
|
|
# Doc: https://docs.aahframework.org/app-config.html#section-server
|
|
@@ -25,6 +30,10 @@ server {
|
|
|
# Default value is 8080.
|
|
|
#port = ""
|
|
|
|
|
|
+ # Header value written as `Server` HTTP header.
|
|
|
+ # If you do not want to include `Server` header, comment it out.
|
|
|
+ header = "aah-go-server"
|
|
|
+
|
|
|
# Valid time units are "s = seconds", "m = minutes"
|
|
|
timeout {
|
|
|
# mapped to `http.Server.ReadTimeout`.
|
|
@@ -100,6 +109,30 @@ server {
|
|
|
#cache_dir = "/Users/jeeva/autocert"
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ # To manage aah server effectively it is necessary to know details about the
|
|
|
+ # request, response, processing time, client IP address, etc. aah framework
|
|
|
+ # provides the flexible and configurable access log capabilities.
|
|
|
+ access_log {
|
|
|
+ # Enabling server access log
|
|
|
+ # Default value is `false`.
|
|
|
+ #enable = true
|
|
|
+
|
|
|
+ # Absolute path to access log file or relative path.
|
|
|
+ # Default location is application logs directory
|
|
|
+ #file = "{{ .AppName }}-access.log"
|
|
|
+
|
|
|
+ # Default server access log pattern
|
|
|
+ #pattern = "%clientip %custom:- %reqtime %reqmethod %requrl %reqproto %resstatus %ressize %restime %reqhdr:referer"
|
|
|
+
|
|
|
+ # Access Log channel buffer size
|
|
|
+ # Default value is `500`.
|
|
|
+ #channel_buffer_size = 500
|
|
|
+
|
|
|
+ # Include static files access log too.
|
|
|
+ # Default value is `true`.
|
|
|
+ #static_file = false
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
# ------------------------------------------------------------------
|
|
@@ -139,11 +172,15 @@ i18n {
|
|
|
# Doc: https://docs.aahframework.org/app-config.html#section-format
|
|
|
# -----------------------------------------------------------------
|
|
|
format {
|
|
|
- # Default value is `2006-01-02`.
|
|
|
- #date = "2006-01-02"
|
|
|
-
|
|
|
- # Default value is `2006-01-02 15:04:05`.
|
|
|
- #datetime = "2006-01-02 15:04:05"
|
|
|
+ # Time format for auto parse and bind. aah tries to parse the
|
|
|
+ # time value in the order they defined till it gets success
|
|
|
+ # otherwise returns the error.
|
|
|
+ time = [
|
|
|
+ "2006-01-02T15:04:05Z07:00",
|
|
|
+ "2006-01-02T15:04:05Z",
|
|
|
+ "2006-01-02 15:04:05",
|
|
|
+ "2006-01-02"
|
|
|
+ ]
|
|
|
}
|
|
|
|
|
|
# ------------------------------------------------------------------
|
|
@@ -161,19 +198,6 @@ runtime {
|
|
|
# Default value is `false`.
|
|
|
#all_goroutines = true
|
|
|
}
|
|
|
-
|
|
|
- # Pooling configuration is to reduce GC overhead from framework.
|
|
|
- # Tune these value based on your use case. Pool doesn't create object
|
|
|
- # unless it's needed.
|
|
|
- # Doc: https://docs.aahframework.org/pooling.html
|
|
|
- pooling {
|
|
|
- # Default value is `500`.
|
|
|
- global = 5000
|
|
|
-
|
|
|
- # Used for `bytes.Buffer`
|
|
|
- # Default value is `200`.
|
|
|
- buffer = 1500
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
# -----------------------------------------------------------------
|
|
@@ -277,11 +301,17 @@ view {
|
|
|
|
|
|
# DataSource config
|
|
|
datasource {
|
|
|
- benchmark {
|
|
|
- driver = "mysql"
|
|
|
- url = "benchmarkdbuser:benchmarkdbpass@tcp(%s:3306)/hello_world"
|
|
|
- }
|
|
|
+ benchmark {
|
|
|
+ driver = "mysql"
|
|
|
+ url = "benchmarkdbuser:benchmarkdbpass@tcp(%s:3306)/hello_world"
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+# --------------------------------------------------------------
|
|
|
+# Application Security
|
|
|
+# Doc: https://docs.aahframework.org/security-config.html
|
|
|
+# --------------------------------------------------------------
|
|
|
+include "./security.conf"
|
|
|
|
|
|
# --------------------------------------------------------------
|
|
|
# Environment Profiles e.g.: dev, qa, prod
|