--- a/annot-server/server.tac Wed Oct 08 18:08:52 2014 +0200
+++ b/annot-server/server.tac Thu Oct 09 08:44:36 2014 +0200
@@ -4,6 +4,7 @@
# Copyright (c) 2014 IRI
#
+import os.path
import sys
import psycopg2.extras
@@ -13,22 +14,14 @@
from txpostgres import txpostgres
from annotserver import make_service
+frpm config import config
from models import get_table_create_stmt
from utils import create_connection_pool
-#postgresql://[user[:password]@][netloc][:port][/dbname][?param1=value1&...]
psycopg2.extras.register_uuid()
-config = {
- 'web_port': 8080,
- 'ws_port': 8090,
- 'osc_port': 9090,
- 'conn_str': 'postgresql://iri:iri@localhost:5432/annotations'
-}
-
-
conn, d = create_connection_pool(config['conn_str'])
#to do treat error
d.addCallback(lambda _: conn.runOperation(get_table_create_stmt()))