# HG changeset patch # User Raphael Velt # Date 1323696380 -3600 # Node ID 6626b728b1427f31fcc8c49dd7220ec88e331b77 # Parent 89968844eb7ddb8066b3e1c691d493dfc52588b0 Added configuration file to Tweetcast Gevent Server diff -r 89968844eb7d -r 6626b728b142 tweetcast/server-gevent/server_setup.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tweetcast/server-gevent/server_setup.py Mon Dec 12 14:26:20 2011 +0100 @@ -0,0 +1,2 @@ +SQL_CONNECT = 'postgresql://user:pass@hostname/database' +WEB_PORT = 8888 \ No newline at end of file diff -r 89968844eb7d -r 6626b728b142 tweetcast/server-gevent/tweetcast.py --- a/tweetcast/server-gevent/tweetcast.py Mon Dec 12 12:54:14 2011 +0100 +++ b/tweetcast/server-gevent/tweetcast.py Mon Dec 12 14:26:20 2011 +0100 @@ -11,9 +11,10 @@ from gevent.pywsgi import WSGIServer from urlparse import parse_qs import datetime +from server_setup import SQL_CONNECT, WEB_PORT Base = declarative_base() -engine = create_engine('postgresql://raph:yusao6Kh@localhost/tweets') +engine = create_engine(SQL_CONNECT) Session = sessionmaker(bind=engine) class TweetSource(Base): @@ -134,4 +135,4 @@ return ['

Not Found

'] session = Session() -WSGIServer(('', 8888), webserver).serve_forever() \ No newline at end of file +WSGIServer(('', WEB_PORT), webserver).serve_forever() \ No newline at end of file