<commit_before>#################
#### imports ####
#################

from flask import Flask
from flask.ext.bcrypt import Bcrypt
from flask.ext.login import LoginManager
from mongokit import *
from flask.ext.bcrypt import Bcrypt
from flask.ext.cors import CORS
from mongokit import *

################
#### config ####
################
connection = Connection()
Users = connection['thehookemup'].Users
ROUTE_PREPEND='/api/v1'
app = Flask(__name__)
cors = CORS(app, allow_headers='Content-Type')
app.secret_key = '<KEY>'
app.debug = True

bcrypt = Bcrypt(app)
login_manager = LoginManager()
login_manager.init_app(app)


#app.config.from_object(os.environ['APP_SETTINGS'])




from project.users.views import users_blueprint
app.register_blueprint(users_blueprint)


'''
from project.home.views import home_blueprint
from project.admin.views import admin_blueprint

# register our blueprints
app.register_blueprint(users_blueprint)
app.register_blueprint(home_blueprint)
app.register_blueprint(admin_blueprint)


'''
login_manager.login_view = "users.login"

#TODO: We should probably use _id instead of email for login and out info
@login_manager.user_loader
def load_user(user_id):
    return Users.User.find_one({'email':user_id})
<commit_msg>Fixed CORS. Assume client at http://localhost:3000<commit_after>#################
#### imports ####
#################

from flask import Flask
from flask.ext.bcrypt import Bcrypt
from flask.ext.login import LoginManager
from mongokit import *
from flask.ext.bcrypt import Bcrypt
from flask.ext.cors import CORS
from mongokit import *

################
#### config ####
################
connection = Connection()
Users = connection['thehookemup'].Users
ROUTE_PREPEND='/api/v1'
app = Flask(__name__)
cors = CORS(app, allow_headers=['Origin','Content-Type'],
	supports_credentials=True,
	origins='http://localhost:3000');

app.secret_key = '<KEY>'
app.debug = True

bcrypt = Bcrypt(app)
login_manager = LoginManager()
login_manager.init_app(app)


#app.config.from_object(os.environ['APP_SETTINGS'])




from project.users.views import users_blueprint
app.register_blueprint(users_blueprint)


'''
from project.home.views import home_blueprint
from project.admin.views import admin_blueprint

# register our blueprints
app.register_blueprint(users_blueprint)
app.register_blueprint(home_blueprint)
app.register_blueprint(admin_blueprint)


'''
login_manager.login_view = "users.login"

#TODO: We should probably use _id instead of email for login and out info
@login_manager.user_loader
def load_user(user_id):
    return Users.User.find_one({'email':user_id})

{'fraction_non_alphanumeric': 0.15629800307219663, 'fraction_numerical': 0.0038402457757296467, 'mean_word_length': 6.661764705882353, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6496666', 'n_tokens_mistral': 837, 'n_tokens_neox': 814, 'n_words': 185}