-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.py
More file actions
41 lines (29 loc) · 977 Bytes
/
example.py
File metadata and controls
41 lines (29 loc) · 977 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
30
31
32
33
34
35
36
37
38
39
40
41
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}")
if __name__ == '__main__':
run()