0

In my application I'd like to add some parameters to the app.run() command.

Without modules, that would be easy:

if __name__ == "__main__":
    app.run(parameter=value)

However, I am using the application factory approach, which does not seem to have an explicit call to that function directly.

Is there any way I can still add parameters? I know that I can do it by passing the parameters in command line to the flask run command, but I'd prefer to avoid going that route.

Lee White
  • 3,649
  • 8
  • 37
  • 62

1 Answers1

-1

tell exactly what parameter you wanna add? some parameter like debug,host, port, ... can added with config dictionary:

app.config["SERVERNAME"] = "ip:port"
app.config["DEBUG"] = True