Last active
August 9, 2022 22:45
-
-
Save maxfire2008/8b822cb87a2f4ca54ab15cc46f56d076 to your computer and use it in GitHub Desktop.
Makes flask much much much easier to use with a powershell script
This file contains 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 characters
#!/usr/bin/pwsh | |
param ( | |
[string]$FlaskApp = "app.py", | |
[string]$FlaskEnvironment = "development", | |
[string]$IPHost = "127.0.0.1", | |
[string]$Port = 5000 | |
) | |
#set env var "FLASK_APP" to $args[0] | |
#set env var "FLASK_ENV" to $args[1] | |
$env:FLASK_APP=$FlaskApp | |
$env:FLASK_ENV=$FlaskEnvironment | |
py -m flask run --host $IPHOST --port $Port |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment