Skip to content
NCrashed edited this page Oct 16, 2014 · 19 revisions

Application config is a text file (UTF-8), which contains json string.

Config example

{
	"bindAddresses" : [
            "127.0.0.1",
            "192.168.1.100",
	],

	"hostname" : "",
	
	"port" : 8888,
	
	"maxConn" : 50,
	
	"sqlServers" : [
		{
			"name" : "sql1",
			"connString" : "",
			"maxConn" : 1
		},
		{
			"name" : "sql2",
			"connString" : "",
			"maxConn" : 2
		}
	],
	
	"sqlTimeout": 100,
	"aliveCheckTime": 3000,
	"sqlReconnectTime": 150,
	
	"sqlAuth" : ["login", "password"],
	
	"sqlJsonTable" : "json_rpc",

    "vibelog" : "logs/http.log",

    "logname" : "logs/log0.log",
    "userid": "postgres",
    "groupid": "postgres"
}
  • bindAddresses - The interfaces on which the HTTP server is listening. By default, the server will listen on all IPv4 and IPv6 interfaces.
  • hostname - Determines the server host name. If multiple servers are listening on the same port, the host name will determine which one gets a request.
  • port[*] - The port on which the HTTP server is listening.
  • maxConn[*] - Number of maximum HTTP connections.
  • sqlServers[*] - Array of sql servers.
    • name[*] - SQL server name.
    • connString[*] - PostgreSQL rule connection string.
    • maxConn[*] - Number of maximum connections to SQL server
  • sqlTimeout[*] - SQL connection / response timeout.
  • aliveCheckTime - connection pool does test queries to check connections over this time in milliseconds. Default is 3 seconds.
  • sqlReconnectTime - Timeout appearance of free sql connection. By default, sqlTimeout used.
  • sqlAuth - Auth information for sql queries. (Names of sql variables).
  • sqlJsonTable[*] - JSON-RPC to SQL table name.
  • vibelog[*] - Vibe log file path.
  • logname[*] - Log file path. Hint: default directory to logs on linux is /var/log/rpc-sql-proxy/
  • userid - user id (int or user name) used to low server privileges, if isn't specified then server cannot drop root
  • groupid - group id (int or group name) used to low server privileges, if isn't specified then server cannot drop root
  • logSqlTransactions - true/false flag. Default is false. If set to true all transactions are logged.
  • logJsonQueries - true/false flag. Default is false. If set to true all JSON RPC requests are logged.

[*] - required parameters.

Clone this wiki locally