Sha256: 610d11c694362a73ff8885b9ab200befb1896c7d9f3e4ca536c714e464129ea5
Contents?: true
Size: 575 Bytes
Versions: 41
Compression:
Stored size: 575 Bytes
Contents
from pprint import pprint import json import os.path def lambda_handler(event, context): homepage = "public/index.html" html = None if os.path.exists(homepage): with open(homepage,'r') as f: html = f.read() return response(html, 200) def response(body, status_code): return { 'statusCode': str(status_code), 'body': body, 'headers': { 'Content-Type': 'text/html', 'Access-Control-Allow-Origin': '*' }, } if __name__ == '__main__': print(lambda_handler({}, {}))
Version data entries
41 entries across 41 versions & 1 rubygems