This repository was archived by the owner on May 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +78
-34
lines changed Expand file tree Collapse file tree 9 files changed +78
-34
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ PROJECT_NAME=template-serverless-lambda-python-lambda-api
22NETWORK_NAME=service-python
33APP_QUEUE=test-queue
44APP_LAMBDA_NAME=lambda_api
5- APP_LAMBDA_EVENT_SOURCE=false
5+ APP_LAMBDA_EVENT_SOURCE=false
6+ APP_PORT=5001
Original file line number Diff line number Diff line change 11python3 -m venv venv
22source ./venv/bin/activate
33
4- if [ " $1 " = " --port" ]
5- then
4+ if test -f .projectrc; then
5+ source .projectrc
6+ elif test -f ./scripts/.projectrc; then
7+ source ./scripts/.projectrc
8+ fi
9+
10+ if [ " $1 " = " --port" ]; then
611 PORT=$2
712fi
8- if [ -z " $PORT " ]
9- then
10- PORT=5000
13+ if [ -z " $PORT " ]; then
14+ if [ -z " $APP_PORT " ]; then
15+ PORT=5000
16+ else
17+ PORT=$APP_PORT
18+ fi
1119fi
1220
21+ echo " app port: $PORT "
1322export FLASK_ENV=development
1423export FLASK_APP=app.py
15- # export FLASK_DEBUG=1
16- flask run $1 $2
24+ # export FLASK_DEBUG=1
25+ # flask run $1 $2
26+ flask run --host=0.0.0.0 --port=$PORT
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ PROJECT_NAME=template-serverless-lambda-python-lambda-api-restful
22NETWORK_NAME=service-python
33APP_QUEUE=test-queue
44APP_LAMBDA_NAME=lambda_api_restful
5- APP_LAMBDA_EVENT_SOURCE=false
5+ APP_LAMBDA_EVENT_SOURCE=false
6+ APP_PORT=5001
Original file line number Diff line number Diff line change @@ -178,6 +178,6 @@ paths:
178178 /v1/product/{uuid} : {}
179179servers :
180180- description : Development server
181- url : http://localhost:5000
181+ url : http://localhost:5001
182182- description : Development server
183- url : http://localhost:5000
183+ url : http://localhost:5001
Original file line number Diff line number Diff line change 11python3 -m venv venv
22source ./venv/bin/activate
33
4- if [ " $1 " = " --port" ]
5- then
4+ if test -f .projectrc; then
5+ source .projectrc
6+ elif test -f ./scripts/.projectrc; then
7+ source ./scripts/.projectrc
8+ fi
9+
10+ if [ " $1 " = " --port" ]; then
611 PORT=$2
712fi
8- if [ -z " $PORT " ]
9- then
10- PORT=5000
13+ if [ -z " $PORT " ]; then
14+ if [ -z " $APP_PORT " ]; then
15+ PORT=5000
16+ else
17+ PORT=$APP_PORT
18+ fi
1119fi
1220
21+ echo " app port: $PORT "
1322export FLASK_ENV=development
1423export FLASK_APP=app.py
15- # export FLASK_DEBUG=1
16- flask run $1 $2
24+ # export FLASK_DEBUG=1
25+ # flask run $1 $2
26+ flask run --host=0.0.0.0 --port=$PORT
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ PROJECT_NAME=template-serverless-lambda-python-lambda-sqs
22NETWORK_NAME=service-python
33APP_QUEUE=test-queue
44APP_LAMBDA_NAME=lambda_sqs
5- APP_LAMBDA_EVENT_SOURCE=true
5+ APP_LAMBDA_EVENT_SOURCE=true
6+ APP_PORT=5000
Original file line number Diff line number Diff line change 11python3 -m venv venv
22source ./venv/bin/activate
33
4- if [ " $1 " = " --port" ]
5- then
4+ if test -f .projectrc; then
5+ source .projectrc
6+ elif test -f ./scripts/.projectrc; then
7+ source ./scripts/.projectrc
8+ fi
9+
10+ if [ " $1 " = " --port" ]; then
611 PORT=$2
712fi
8- if [ -z " $PORT " ]
9- then
10- PORT=5000
13+ if [ -z " $PORT " ]; then
14+ if [ -z " $APP_PORT " ]; then
15+ PORT=5000
16+ else
17+ PORT=$APP_PORT
18+ fi
1119fi
1220
21+ echo " app port: $PORT "
1322export FLASK_ENV=development
1423export FLASK_APP=app.py
15- # export FLASK_DEBUG=1
16- flask run $1 $2
24+ # export FLASK_DEBUG=1
25+ # flask run $1 $2
26+ flask run --host=0.0.0.0 --port=$PORT
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ PROJECT_NAME=template-serverless-lambda-python-lambda-sqs-light
22NETWORK_NAME=service-python
33APP_QUEUE=test-queue
44APP_LAMBDA_NAME=lambda_sqs_light
5- APP_LAMBDA_EVENT_SOURCE=true
5+ APP_LAMBDA_EVENT_SOURCE=true
6+ APP_PORT=5000
Original file line number Diff line number Diff line change 11python3 -m venv venv
22source ./venv/bin/activate
33
4- if [ " $1 " = " --port" ]
5- then
4+ if test -f .projectrc; then
5+ source .projectrc
6+ elif test -f ./scripts/.projectrc; then
7+ source ./scripts/.projectrc
8+ fi
9+
10+ if [ " $1 " = " --port" ]; then
611 PORT=$2
712fi
8- if [ -z " $PORT " ]
9- then
10- PORT=5000
13+ if [ -z " $PORT " ]; then
14+ if [ -z " $APP_PORT " ]; then
15+ PORT=5000
16+ else
17+ PORT=$APP_PORT
18+ fi
1119fi
1220
21+ echo " app port: $PORT "
1322export FLASK_ENV=development
1423export FLASK_APP=app.py
15- # export FLASK_DEBUG=1
16- flask run $1 $2
24+ # export FLASK_DEBUG=1
25+ # flask run $1 $2
26+ flask run --host=0.0.0.0 --port=$PORT
You can’t perform that action at this time.
0 commit comments