Back to SSL | Testing on multiple machines |
Using a different port
By default, flask uses the 5000 port on your computer. We might not always want this though, as we could have another program using that port. You can therefore tell the program to use a specific port:
app.run(port=5000)
We can add multiple of these arguments to the run function at the same time. If you wanted to use a SSL certificate and also run the program at port 8091, you could add both.
app.run(port=8091,ssl_context=('selfsigned.crt', 'private.key'))
Back to SSL | Return to top | Testing on multiple machines |