-
-
Save rajavijaysingh/ac5caede04c79ba7c504a16574bf7f8d to your computer and use it in GitHub Desktop.
Revisions
-
Cox65 revised this gist
Dec 26, 2022 . 1 changed file with 30 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,30 @@ org: cox65 app: fastapi-aws-starter-kit service: fastapi-aws-starter-kit package: individually: true provider: name: aws runtime: python3.9 region: eu-west-1 httpApi: cors: true timeout: 10 memorySize: 128 plugins: - serverless-python-requirements - serverless-offline functions: app: package: patterns: - "fastapi_aws_starter_kit/**" handler: fastapi_aws_starter_kit.handler.handler events: - http: method: any path: /{proxy+} cors: true custom: pythonRequirements: dockerizePip: true -
Cox65 revised this gist
Dec 26, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ import os import uvicorn if __name__ == "__main__": uvicorn.run( "fastapi_app:app", -
Cox65 revised this gist
Dec 26, 2022 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ from mangum import Mangum from fastapi_aws_starter_kit.fastapi_app import app handler = Mangum(app=app) -
Cox65 revised this gist
Dec 18, 2022 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ import os import uvicorn if __name__ == "__main__": uvicorn.run( "fastapi_app:app", host="127.0.0.1", port=5000, reload=True, ) -
Cox65 revised this gist
Dec 18, 2022 . 1 changed file with 0 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,7 @@ from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware app = FastAPI(title="Sample FastAPI app", debug=False, version="1.0.0") app.add_middleware( CORSMiddleware, allow_origins=["*"], -
Cox65 revised this gist
Dec 18, 2022 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,5 @@ from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware # Declare the application app = FastAPI(title="Sample FastAPI app", debug=False, version="1.0.0") -
Cox65 revised this gist
Dec 18, 2022 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,9 @@ from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from fastapi_aws_starter_kit.routers.health_check_api import router as hc_router # Declare the application app = FastAPI(title="Sample FastAPI app", debug=False, version="1.0.0") app.add_middleware( -
Cox65 created this gist
Dec 18, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ from fastapi import FastAPI from starlette.middleware.cors import CORSMiddleware from fastapi_aws_starter_kit.routers.health_check_api import router as hc_router from fastapi_aws_starter_kit.config import PROJECT_NAME, API_VERSION # Declare the application app = FastAPI(title=PROJECT_NAME, debug=False, version=API_VERSION) app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get( path="/health", description="Health check" ) def health_check(): return {"status": "OK"}