mirror of
https://github.com/zaphar/ucg.git
synced 2025-07-22 18:19:54 -04:00
26 lines
665 B
Plaintext
26 lines
665 B
Plaintext
// A few constants.
|
|
let dbhost1 = "db1.prod.net";
|
|
let dbhost2 = "db2.prod.net";
|
|
let dbname = "testdb";
|
|
|
|
// Constructor for database connection strings.
|
|
let mk_db_conn = macro (host, port, db) => {
|
|
host = host,
|
|
port = port,
|
|
db = db,
|
|
conn_string = "@:@/@" % (host, port, db)
|
|
};
|
|
|
|
let db_conn1 = mk_db_conn(dbhost1, 3306, dbname);
|
|
let db_conn2 = mk_db_conn(dbhost2, 3306, dbname);
|
|
|
|
// We have two database connections in a list
|
|
let db_conns = [db_conn1.conn_string, db_conn2.conn_string];
|
|
|
|
// Our server configuration.
|
|
let server_config = {
|
|
dbconn_list = db_conns,
|
|
db_conn1 = db_conns.0,
|
|
db_conn2 = db_conns.1,
|
|
tmpldir = "./templates"
|
|
}; |