emmett-framework / granian

A Rust HTTP server for Python applications
BSD 3-Clause "New" or "Revised" License
2.86k stars 83 forks source link

Enhancement: Add protocol to listen address #251

Closed JacobCoffee closed 7 months ago

JacobCoffee commented 8 months ago

Background

When running other servers they prepend the address with http:// or https://.

With this, inside of the CLI, PyCharm, or ~vscode~ worse editors it allows you to click the link directly.

Ask

In https://github.com/emmett-framework/granian/blob/f1849fb9d11af37cffefe6e319d0c11a509888fb/granian/server.py#L410, update:

[INFO] Listening at: 127.0.0.1:8000

to

[INFO] Listening at: http(s)://127.0.0.1:8000

so that it may be clickable.

Why

This is just handy in development.