Last active
June 16, 2016 14:12
-
-
Save mozkurt27/e0de475b2e56a3c70b0c968b88494c64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
read = function(err, db) | |
{ | |
if(err){ | |
console.log("Database açılmadı" + err); | |
} | |
else | |
{ | |
var PARSE_JSON = parse_json.bind(this); | |
collections.find().toArray(PARSE_JSON); | |
} | |
} | |
parse_json = function(err, document) | |
{ | |
if(err){ | |
console.log("cant find the reqd collection" + err); | |
} | |
else if(document){ | |
this.render('display/db_tweets', { tweets: document, requesting: query }); | |
} | |
} | |
display_tweets = function(req, res) | |
{ | |
var read_db = read.bind(res); | |
MongoClient.connect("mongodb://" + address + ":" + port + "/" + database,read_db); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment