--- a/server.py +++ b/server.py @@ -31,7 +31,7 @@ @app.route('/fetch', methods=['GET']) def fetch(): - connection = pymongo.Connection() + connection = pymongo.MongoClient('localhost',27017) db = connection['mural'] collection = db['data'] ret = {} @@ -58,7 +58,7 @@ @app.route('/search', methods=['GET']) def search(): - connection = pymongo.Connection() + connection = pymongo.MongoClient('localhost',27017) db = connection['mural'] collection = db['data'] y = 0 @@ -97,7 +97,7 @@ @app.route('/submit', methods=['POST']) def submit(): - c = pymongo.Connection() + c = pymongo.MongoClient('localhost',27017) db = c['mural'] coll = db['data'] requestData = json.loads(request.form['data'])