forked from Countract-Blockchain/Server_Countract
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
29 lines (23 loc) · 803 Bytes
/
Copy pathapp.py
File metadata and controls
29 lines (23 loc) · 803 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
27
28
29
from flask import Flask
import os
from configs.config import app_config
app = Flask(__name__, static_folder=None)
config = {}
config['app_host'] = os.getenv('app_host')
config['app_port'] = os.getenv('app_port')
if config['app_host'] == None:
config['app_host'] = app_config['host']
if config['app_port'] == None:
config['app_port'] = app_config['port']
try:
from controllers.user_controller import *
from controllers.dokumen_controller import *
from controllers.akses_controller import *
except Exception as e:
print(e)
if __name__ == '__main__':
# print("Server is running on host: " + config['app_host'] + " and port: " + config['app_port'])
@app.route("/")
def index():
return "This is Countract"
app.run(debug=True, host='0.0.0.0', port='5000')