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
module.exports = { | |
port: 1337, | |
environment: "development", | |
reddit: { | |
clientID: "CLIENTID GOES HERE", | |
clientIDSecret: "CLIENTIDSECRET GOES HERE", | |
redirectURL: "http://localhost:1337/auth/reddit/callback", | |
adminRefreshToken: "ADMINREFRESHTOKEN GOES HERE" | |
}, |
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
from pymongo import MongoClient | |
from bson.objectid import ObjectId | |
db = MongoClient('mongodb://localhost:27017/').fapp | |
username_map = {} | |
reverse_map = {} | |
initial_list_of_users = [] | |
print "Beginning database migration.\nAccounting for users..." | |
for user in db.user.find({}): | |
username_map[str(user['_id'])] = user['name'] | |
reverse_map[user['name']] = str(user['_id']) |
NewerOlder