forked from monokoo/crysadm-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcrysadm.py
executable file
·37 lines (31 loc) · 998 Bytes
/
crysadm.py
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
27
28
29
30
31
32
33
34
35
36
37
#! /usr/bin/env python3.4
# -*- coding: utf-8 -*-
# crysadm.py - main entance for web GUI
from flask import Flask
import config
import socket
import redis
app = Flask(__name__)
"""
if socket.gethostname() == 'GXMBP.local':
app.config.from_object(config.DevelopmentConfig)
elif socket.gethostname() == 'iZ23bo17lpkZ':
app.config.from_object(config.ProductionConfig)
else:
app.config.from_object(config.TestingConfig)
"""
app.config.from_object(config.ProductionConfig)
redis_conf = app.config.get('REDIS_CONF')
pool = redis.ConnectionPool(host=redis_conf.host, port=redis_conf.port,
db=redis_conf.db, password=redis_conf.password)
r_session = redis.Redis(connection_pool=pool)
from admin import *
from user import *
from web_common import *
from account import *
from excavator import *
from message import *
from analyzer import *
if __name__ == '__main__':
app.run(host=app.config.get('SERVER_IP'),
port=app.config.get('SERVER_PORT'))