forked from Superposition-Development/RelayServer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
26 lines (21 loc) · 608 Bytes
/
main.py
File metadata and controls
26 lines (21 loc) · 608 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from flask import request
from init import app, cors
import database
from routes.auth import bpAuth
from routes.server import bpServer
from routes.channel import bpChannel
@app.before_request
def before_request():
allowed_origin = request.headers.get('Origin')
# if allowed_origin in ['http://localhost:4100']:
cors._origins = allowed_origin
@app.route("/")
def home():
return "eventually lets put something cool here"
app.register_blueprint(bpAuth)
app.register_blueprint(bpServer)
app.register_blueprint(bpChannel)
def run():
database.initialize()
app.run(port=8080)
run()