# Port configuration

### How routing works

Every web services come with default domain, optionally you an set a custom domain.  All requests pass through our load balancer as follows:

Let's say your app starts and  listen for requests on port `4000`

Our load balancer is configured the way that every request coming to your app on port `443` or `80` are proxied to port `4000`  of your app&#x20;

<figure><img src="https://2867534495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbNf270GhCkiDUk1lHetj%2Fuploads%2FDfLXM5mmLPgljaXS5fkM%2Fimage.png?alt=media&#x26;token=dc96625b-d0dc-4494-a0aa-3816a657f286" alt=""><figcaption></figcaption></figure>

### Examples

<table><thead><tr><th>Web service name</th><th width="301">Public connection</th><th>Private connection</th></tr></thead><tbody><tr><td>web-abcdefgh</td><td>https://web-abcdefgh.up-de-fra1-k8s-1.apps.run-on-seenode.com</td><td>http://web-abcdefgh-service</td></tr><tr><td></td><td></td><td></td></tr></tbody></table>

#### Flask example:

1. Let's say your app is configured to start on port `4000`

**app.py**

```python
from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello():
    return "Hello, World!"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=4000)
```

2. Set the port to `4000`

<figure><img src="https://2867534495-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbNf270GhCkiDUk1lHetj%2Fuploads%2FuJSb1DDYTAGKMkiEtJ27%2FScreenshot%202025-02-28%20at%2011.50.12%E2%80%AFAM.png?alt=media&#x26;token=66bc46e2-338d-4566-9b79-6552095d4ef5" alt=""><figcaption></figcaption></figure>

3. Follow the next steps by clicking continue
4. Now when the app is built and deployed successfully you can connect to your app by:
   1. Public connection domain (user for access from the internet)
   2. Private connection domain (use for internal connections between your services)
