-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
64 lines (47 loc) · 1.57 KB
/
Copy pathexample.py
File metadata and controls
64 lines (47 loc) · 1.57 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from minicli import cli, run
from waitress import serve
@cli
def routing(host: str="0.0.0.0", port: int=8000):
from routing.app import app
app.events.lifecycle.on_init.send('startup')
serve(app, listen=f"{host}:{port}")
@cli
def traject(host: str="0.0.0.0", port: int=8000):
from traject.app import app
app.events.lifecycle.on_init.send('startup')
serve(app, listen=f"{host}:{port}")
@cli
def zodb(host: str="0.0.0.0", port: int=8000):
from zodb.app import app
app.events.lifecycle.on_init.send('startup')
serve(app, listen=f"{host}:{port}")
@cli
def graphql(host: str="0.0.0.0", port: int=8000):
from gql.app import app
app.events.lifecycle.on_init.send('startup')
serve(app, listen=f"{host}:{port}")
@cli
def upload(host: str="0.0.0.0", port: int=8000):
from fileupload.app import app
app.events.lifecycle.on_init.send('startup')
serve(app, listen=f"{host}:{port}")
@cli
def all(host: str="0.0.0.0", port: int=8000):
from wolf.app.nodes import Mapping
from routing.app import app as routing_app
from fileupload.app import app as upload_app
from gql.app import app as graphql_app
from zodb.app import app as zodb_app
from traject.app import app as traject_app
app = Mapping({
"/routing": routing_app,
"/upload": upload_app,
"/graphql": graphql_app,
"/traject": traject_app,
"zodb": zodb_app,
})
for subapp in app.values():
subapp.events.lifecycle.on_init.send('startup')
serve(app, listen=f"{host}:{port}")
if __name__ == '__main__':
run()