Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

clear vars on load

  • Loading branch information...
commit fba6831389f756ca1697ed9920b28aec9d64068a 1 parent eb321ce
@abraham authored
Showing with 18 additions and 0 deletions.
  1. +18 −0 server.js
View
18 server.js
@@ -20,6 +20,23 @@ var users = [
res = false,
callback = false;
+function reset() {
+ users = [
+ { friends: [], followers: [], screenName: null },
+ { friends: [], followers: [], screenName: null }
+ ],
+ commonFriends = [],
+ commonFollowers = [],
+ userAFriendsFollowingUserB = [],
+ userBFriendsFollowingUserA = [],
+ complete = 0,
+ ids = [],
+ profiles = [],
+ active = 0
+ res = false,
+ callback = false;
+}
+
var twitter = new Twitter({
consumer_key: config.twitter.consumer_key,
consumer_secret: config.twitter.consumer_secret,
@@ -30,6 +47,7 @@ var twitter = new Twitter({
http.createServer(function (request, result) {
var options = require('url').parse(request.url, true);
res = result;
+ reset();
if (options.query && options.query.callback) {
callback = options.query.callback;
Please sign in to comment.
Something went wrong with that request. Please try again.