From 0d3e0684928910431408ceee92dd2959211c8e2f Mon Sep 17 00:00:00 2001 From: Sameer Dev Date: Tue, 23 Apr 2024 22:44:42 +0530 Subject: [PATCH] ID:FCLD-228;DONE:7;HOURS:7; system file gen test in builder --- fc.toml | 17 +++++++++++++++++ handler.py | 16 ++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 fc.toml create mode 100644 handler.py diff --git a/fc.toml b/fc.toml new file mode 100644 index 0000000..52a9040 --- /dev/null +++ b/fc.toml @@ -0,0 +1,17 @@ +app = "python-dockerfile-func-sample" +region = "asia-south1" +handler = "handler.handler" + +[build] + builtin = "dockerfile" + ignorefile = ".gitignore" + + [build.args] + param1 = "value1" + param2 = "value2" + +[env] + FOO = "BAR" + +[http_service] + internal_port = 3000 diff --git a/handler.py b/handler.py new file mode 100644 index 0000000..abb0973 --- /dev/null +++ b/handler.py @@ -0,0 +1,16 @@ +# Import the required modules +from flask import jsonify + +# Define the handler function +def handler(request): + # Extract data from the request if needed + # For example, if the request contains JSON data: + # data = request.json + + # Create the response JSON + response_json = { + 'message': 'Hello World' + } + + # Return a JSON response + return jsonify(response_json)