ID:FCLD-228;DONE:7;HOURS:7; system file gen test in builder

This commit is contained in:
Sameer Dev 2024-04-23 22:44:42 +05:30
commit 0d3e068492
2 changed files with 33 additions and 0 deletions

17
fc.toml Normal file
View File

@ -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

16
handler.py Normal file
View File

@ -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)