Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
evm-store
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wanli
evm-store
Commits
34ed0ffb
Commit
34ed0ffb
authored
Jul 01, 2021
by
wanli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c15e3201
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
backend/start.py
backend/start.py
+9
-11
No files found.
backend/start.py
View file @
34ed0ffb
'''
Author: your name
Date: 2021-04-14 14:12:18
LastEditTime: 2021-07-01
00:06:01
LastEditTime: 2021-07-01
15:36:09
LastEditors: Please set LastEditors
Description: In User Settings Edit
FilePath:
\
evm-store
\b
ackend
\
start.py
...
...
@@ -11,6 +11,7 @@ FilePath: \evm-store\backend\start.py
import
sys
import
os
import
signal
import
json
# import tornado.autoreload
from
tornado.wsgi
import
WSGIContainer
from
tornado.web
import
Application
,
RequestHandler
,
FallbackHandler
...
...
@@ -26,9 +27,7 @@ class GracefulExit(SystemExit):
class
VueHandler
(
RequestHandler
):
def
get
(
self
):
remote_ip
=
self
.
request
.
remote_ip
logger
.
info
(
"remote_ip
%
s"
%
remote_ip
)
self
.
render
(
"index.html"
)
self
.
write
(
json
.
dumps
({
'code'
:
200
,
'msg'
:
'success'
,
'data'
:
self
.
request
.
remote_ip
}))
def
raise_graceful_exit
(
*
args
):
IOLoop
.
current
()
.
stop
()
...
...
@@ -36,17 +35,16 @@ def raise_graceful_exit(*args):
raise
GracefulExit
()
def
start
():
settings
=
{
'debug'
:
config
[
'DEBUG'
],
'template_path'
:
config
[
'TEMPLATE_PATH'
],
'static_path'
:
config
[
'STATIC_PATH'
],
'static_url_path'
:
''
,
}
#
settings = {
#
'debug': config['DEBUG'],
#
'template_path': config['TEMPLATE_PATH'],
#
'static_path': config['STATIC_PATH'],
#
'static_url_path': '',
#
}
watch
(
os
.
sep
.
join
([
os
.
getcwd
(),
"restart.json"
]))
wsgi_app
=
WSGIContainer
(
app
)
application
=
Application
([
(
r'/'
,
VueHandler
),
(
r'/index'
,
VueHandler
),
(
r"/api/v1/evm_store/monitor"
,
DeviceMessageHandler
),
(
r"/api/v1/evm_store/watch"
,
WatchHandler
),
(
r"/ws/v1/notify"
,
NotifyHandler
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment