diff --git a/index1.js b/index1.js deleted file mode 100644 index 336dee8..0000000 --- a/index1.js +++ /dev/null @@ -1,67 +0,0 @@ -/* -Created By:Kunal Dwivedi on 27/10/2018 -*/ - -//Declaration -const express = require('express'); -const app = express(); -var twitter = require('twitter'); - -var twitter = new twitter({ - consumer_key: 'mOUpwzhjCGYrPpqBL03n8cbtg', - consumer_secret: 'CFEMDfwkiMnLAO7ofi0ConXlDAmwqUmaAKkx8XQRtfQnMWxI4N', - access_token_key: '261608471-ATGdO8ydPJ3l36vMKJgqTSecpoQZsHNIaBbXjJCJ', - access_token_secret: 'Lwo2SrXGLHapLoXhp3LWiWELpnT1JhPcCEvEgsRmlrkKZ' -}); - -// front-end declarations -app.set('view engine','ejs'); -app.use(express.static('public')); - -//Ensure unique tweets are published -var newpost="first"; - -//Async request -app.get('/loaddata', function (req, res) -{ - var funcvalue,output; - twitter.get('search/tweets', {q: 'earthquake'}, function(error, tweets, response) { - - - if(response.statusCode==429){ - res.send("Too many requests"); - } - else{ - var op=''; - for(var i in tweets.statuses){ - - var output="