Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Dcc XMLJSONConvGUI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DigitalDynamicMeasurement
Dcc XMLJSONConvGUI
Commits
e35b6358
Commit
e35b6358
authored
1 year ago
by
Benedikt
Browse files
Options
Downloads
Patches
Plain Diff
changed server start skript and url only port 5008 now no sufix
parent
5cbf072b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dcc_XMLJSONConvGUI.py
+18
-10
18 additions, 10 deletions
dcc_XMLJSONConvGUI.py
start_servers.sh
+1
-1
1 addition, 1 deletion
start_servers.sh
with
19 additions
and
11 deletions
dcc_XMLJSONConvGUI.py
+
18
−
10
View file @
e35b6358
...
...
@@ -125,11 +125,15 @@ def make_doc(doc):
logger
.
addHandler
(
file_handler
)
logger
.
setLevel
(
logging
.
DEBUG
)
logger
.
info
(
'
This is bok
eh_tableTool
...
'
)
logger
.
info
(
"
This is bok
dcc_XMLJSONConvGUI
...
"
)
hostname
=
socket
.
gethostname
()
IPAddr
=
socket
.
gethostbyname
(
hostname
)
logger
.
info
(
"
Opening Bokeh application on http://
"
+
str
(
hostname
)
+
"
:5003/
"
)
logger
.
info
(
"
Opening Bokeh application on http://
"
+
str
(
IPAddr
)
+
"
:5003/
"
)
try
:
IPAddr
=
socket
.
gethostbyname
(
hostname
)
except
Exception
as
e
:
logger
.
warning
(
"
Maybe there is something wrong with your /etc/hosts
\n
"
+
e
)
IPAddr
=
"
localhost
"
logger
.
info
(
"
Opening Bokeh application on http://
"
+
str
(
hostname
)
+
"
:5008/
"
)
logger
.
info
(
"
Opening Bokeh application on http://
"
+
str
(
IPAddr
)
+
"
:5008/
"
)
myPage
=
Page
()
doc
.
add_root
(
myPage
.
page
)
doc
.
title
=
"
DCC XML/JSON Rest API GUI
"
...
...
@@ -149,22 +153,26 @@ from bokeh.server.server import Server
def
main
():
"""
Launch the server and connect to it.
"""
print
(
"
Preparing
a bokeh
application.
"
)
print
(
"
Preparing
dcc_XMLJSONConvGUI
application.
"
)
io_loop
=
IOLoop
.
current
()
bokeh_app
=
Application
(
FunctionHandler
(
make_doc
))
server
=
Server
({
"
/DCCRestAPIGUI
"
:
bokeh_app
},
server
=
Server
({
""
:
bokeh_app
},
io_loop
=
io_loop
,
http_server_kwargs
=
{
'
max_buffer_size
'
:
900000000
},
websocket_max_message_size
=
500000000
,
port
=
500
3
,
port
=
500
8
,
allow_websocket_origin
=
[
'
*
'
]
)
server
.
start
()
hostname
=
socket
.
gethostname
()
IPAddr
=
socket
.
gethostbyname
(
hostname
)
print
(
"
Opening Bokeh application on http://
"
+
str
(
hostname
)
+
"
:5003/
"
)
print
(
"
Opening Bokeh application on http://
"
+
str
(
IPAddr
)
+
"
:5003/
"
)
try
:
IPAddr
=
socket
.
gethostbyname
(
hostname
)
except
Exception
as
e
:
print
(
"
Maybe there is something wrong with your /etc/hosts
\n
"
+
e
)
IPAddr
=
"
localhost
"
print
(
"
Opening Bokeh application on http://
"
+
str
(
hostname
)
+
"
:5008/
"
)
print
(
"
Opening Bokeh application on http://
"
+
str
(
IPAddr
)
+
"
:5008/
"
)
io_loop
.
add_callback
(
server
.
show
,
"
/
"
)
io_loop
.
start
()
...
...
This diff is collapsed.
Click to expand it.
start_servers.sh
+
1
−
1
View file @
e35b6358
#!/bin/bash
cd
/dcc_XMLJSONConvGUI
uvicorn dcc_server:app
--host
0.0.0.0
--port
8000
--root-path
/dcc_rest_server &
bokeh serve
--show
dcc_XMLJSONConvGUI.py
--allow-websocket-origin
"*"
--port
5010
\ No newline at end of file
python3 dcc_XMLJSONConvGUI.py
--allow-websocket-origin
"*"
--port
5008
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment