diff --git a/frameworks/Python/clace/app.star b/frameworks/Python/clace/app.star index 86c0dd68346..017235a9da9 100644 --- a/frameworks/Python/clace/app.star +++ b/frameworks/Python/clace/app.star @@ -1,6 +1,12 @@ +def json_no_args(): + return {'message': 'Hello, world!'} + +def text_no_args(): + return 'Hello, world!' + app = ace.app("testapp", routes = [ - ace.api("/json", lambda req: {'message': 'Hello, world!'}, type=ace.JSON), - ace.api("/plaintext", lambda req: 'Hello, world!', type=ace.TEXT) + ace.api("/json", type=ace.JSON, handler=json_no_args), + ace.api("/plaintext", type=ace.TEXT, handler=text_no_args) ] ) diff --git a/frameworks/Python/clace/run.sh b/frameworks/Python/clace/run.sh index 311de74eaed..e50158afcc5 100755 --- a/frameworks/Python/clace/run.sh +++ b/frameworks/Python/clace/run.sh @@ -6,15 +6,21 @@ cat < /root/clhome/clace.toml console = false file = false access_logging = false +level = "WARN" [http] -host = "0.0.0.0" +host = "" port = 8080 + +[system] +enable_compression = false + +[app_config] +cors.allow_origin = "" EOF clace server start & sleep 2 clace app create --auth=none --approve /clace / -clace app create --auth=none --approve /clace tfb-server:/ tail -f /dev/null