/* This is a JSON format configuration file */ { /* //ssl:The global ssl files setting "ssl": { "cert": "../../trantor/trantor/tests/server.pem", "key": "../../trantor/trantor/tests/server.pem" }, "listeners": [ { //address: Ip address,0.0.0.0 by default "address": "0.0.0.0", //port: Port number "port": 80, //https: If true, use https for security,false by default "https": false }, { "address": "0.0.0.0", "port": 443, "https": true, //cert,key: Cert file path and key file path, empty by default, //if empty, use global setting "cert": "", "key": "" } ], "db_clients": [ { //name: Name of the client,'default' by default //"name":"", //rdbms: Server type, postgresql,mysql or sqlite3, "postgresql" by default "rdbms": "postgresql", //filename: Sqlite3 db file name //"filename":"", //host: Server address,localhost by default "host": "127.0.0.1", //port: Server port, 5432 by default "port": 5432, //dbname: Database name "dbname": "test", //user: 'postgres' by default "user": "", //passwd: '' by default "passwd": "", //connection_number: 1 by default "connection_number": 1 } ],*/ "app": { //threads_num: The number of IO threads,1 by default, if the value is set to 0, the number of threads //is the number of processors. "threads_num": 1, //enable_session: False by default "enable_session": true, "session_timeout": 0, //document_root: Root path of HTTP document,defaut path is ./ "document_root": "./", //upload_path: The path to save the uploaded file. "uploads" by default. //If the path isn't prefixed with /, ./ or ../, //it is relative path of document_root path "upload_path": "uploads", /* file_types: * HTTP download file types,The file types supported by drogon * by default are "html", "js", "css", "xml", "xsl", "txt", "svg", * "ttf", "otf", "woff2", "woff" , "eot", "png", "jpg", "jpeg", * "gif", "bmp", "ico", "icns", etc. */ "file_types": [ "gif", "png", "jpg", "js", "css", "html", "ico", "swf", "xap", "apk", "cur", "xml" ], //max_connections: Max connections number,100000 by default "max_connections": 100000, //max_connections_per_ip: Max connections number per clinet,0 by default which means no limit "max_connections_per_ip": 0, //Load_dynamic_views: False by default, when set to true, drogon //compiles and loads dynamically "CSP View Files" in directories defined //by "dynamic_views_path" "load_dynamic_views": false, //dynamic_views_path: If the path isn't prefixed with /, ./ or ../, //it is relative path of document_root path "dynamic_views_path": [ "./views" ], //log: Set log output, drogon output logs to stdout by default "log": { //log_path: Log file path,empty by default,in which case,logs are output to the stdout //"log_path": "./", //logfile_base_name: Log file base name,empty by default which means drogon names logfile as //drogon.log ... "logfile_base_name": "", //log_size_limit: 100000000 bytes by default, //When the log file size reaches "log_size_limit", the log file is switched. "log_size_limit": 100000000, //log_level: "DEBUG" by default,options:"TRACE","DEBUG","INFO","WARN" //The TRACE level is only valid when built in DEBUG mode. "log_level": "DEBUG" }, //run_as_daemon: False by default "run_as_daemon": false, //relaunch_on_error: False by default, if true, the program will be restart by the parent after exiting; "relaunch_on_error": false, //use_sendfile: True by default, if ture, the program //uses sendfile() system-call to send static files to clients; "use_sendfile": true, //use_gzip: True by default, use gzip to compress the response body's content; "use_gzip": true, //static_files_cache_time: 5 (seconds) by default,the time in which static file response is cached, //0 means cache forever, the negative value means no cache "static_files_cache_time": 5, //simple_controllers_map: Used to configure mapping from path to simple controller "simple_controllers_map": [ { "path": "/path/name", "controller": "controllerClassName", "http_methods": [ "get", "post" ], "filters": [ "FilterClassName" ] } ], //idle_connection_timeout: Defaults to 60 seconds, the lifetime //of the connection without read or write "idle_connection_timeout": 60, //enable_fast_db_client: Defaults to false "enable_fast_db_client": false, //server_header_field: Set the 'server' header field in each response sent by drogon, //empty string by default with which the 'server' header field is set to "Server: drogon/version string\r\n" "server_header_field": "", //keepalive_requests: Sets the maximum number of requests that can be served through one keep-alive connection. //After the maximum number of requests are made, the connection is closed. //The default value of 0 means no limit. "keepalive_requests": 0, //pipeline_requests: Sets the maximum number of unhandled requests that can be cached in pipeline buffer. //After the maximum number of requests are made, the connection is closed. //The default value of 0 means no limit. "pipeline_requests": 0 } }