# here's a sample directory
test_directory = Dir(base='tests/',
                     index_file='index.html',
                     default_ctype='text/plain')

htchat_dir = Dir(base='htchat/', 
                    index_file='index.html', 
                    default_ctype='text/plain')

# a sample of doing some handlers
htchat_app = Handler(send_spec='tcp://127.0.0.1:9999',
                    send_ident='54c6755b-9628-40a4-9a2d-cc82a816345e',
                    recv_spec='tcp://127.0.0.1:9998', recv_ident='',
                    protocol='tnetstring')

handler_test = Handler(send_spec='tcp://127.0.0.1:9990',
                       send_ident='34f9ceee-cd52-4b7f-b197-88bf2f0ec378',
                       recv_spec='tcp://127.0.0.1:9989', recv_ident=''
                       #)
                       ,protocol='tnetstring')

# your main host
mongrel2 = Host(name="ashley-jason.com", routes={
    '/handlertest': handler_test
    '/htchat' : htchat_dir
    '/htchat/app' :htchat_app
}
)

# the server to run them all
main = Server(
    uuid="5",
    access_log="/logs/access.log",
    error_log="/logs/error.log",
    chroot="./",
    pid_file="/run/mongrel2.pid",
    default_host="ashley-jason.com",
    matching='(.*)',
    name="main",
    port=6767,
    #bind_addr="127.0.0.1",
    hosts=[mongrel2]
)



settings = {"zeromq.threads": 1,
            "limits.client_read_retries" : 80,
            "limits.min_ping" : 0,
            "limits.min_write_rate":0,
            "limits.min_read_rate":0}

servers = [main]


