{"id":20698210,"url":"https://github.com/fly-apps/fly-app-with-multiple-internal-ports","last_synced_at":"2025-07-23T16:34:28.339Z","repository":{"id":104276752,"uuid":"498415785","full_name":"fly-apps/fly-app-with-multiple-internal-ports","owner":"fly-apps","description":"Example of how to deploy an app that has multiple ports listened to","archived":false,"fork":false,"pushed_at":"2022-12-16T16:47:50.000Z","size":14,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-09T00:24:14.288Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fly-apps.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-31T16:34:24.000Z","updated_at":"2024-06-11T20:00:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"30bc9647-2abd-4ec6-9097-ba44712513a5","html_url":"https://github.com/fly-apps/fly-app-with-multiple-internal-ports","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fly-apps/fly-app-with-multiple-internal-ports","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Ffly-app-with-multiple-internal-ports","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Ffly-app-with-multiple-internal-ports/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Ffly-app-with-multiple-internal-ports/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Ffly-app-with-multiple-internal-ports/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fly-apps","download_url":"https://codeload.github.com/fly-apps/fly-app-with-multiple-internal-ports/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Ffly-app-with-multiple-internal-ports/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266714363,"owners_count":23973109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T00:23:44.435Z","updated_at":"2025-07-23T16:34:28.289Z","avatar_url":"https://github.com/fly-apps.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fly Example: Apps with Multiple Exposed Ports\n\nFor this example we will show how to expose multiple ports from your app. \n\nWe will be using NodeJS with Express but that's not what's important, what matters\nis that our app listen to two different ports and each port has a different handler.\n\nLook at [main.js](main.js) to see that we have two servers running on different ports.\nThen take a look on [fly.toml](fly.toml) for the line by line explanation of\nhow you can configure you app to listen to these different ports.\n\n## How to deploy\n\nLaunch to create the app, but don't deploy it yet.\n\n```sh\n# Launch the app and keep the configuration by replying Yes on the first question\n$ fly launch\nAn existing fly.toml file was found\n? Would you like to copy its configuration to the new app? Yes\nCreating app in /path/to/folder\nScanning source code\nDetected a Dockerfile app\n? Choose an app name (leave blank to generate one): myappname-multiple-ports\n? Select Organization: Lubien (personal)\n? Choose a region for deployment: São Paulo (gru)\nCreated app myappname-multiple-ports in organization personal\nAdmin URL: https://fly.io/apps/myappname-multiple-ports\nHostname: myappname-multiple-ports.fly.dev\nWrote config file fly.toml\n? Would you like to setup a Postgresql database now? No\n? Would you like to set up an Upstash Redis database now? No\n? Would you like to deploy now? No\nYour app is ready! Deploy with `flyctl deploy`\n```\n\nThis app needs a dedicated global IPv4 address; a shared one won't work with multiple services. Fly.io does not automatically allocate [dedicated IPv4s](https://fly.io/docs/about/pricing/#anycast-ip-addresses), so you have to provision one yourself:\n\n```\n$ fly ips allocate-v4\n```\n\nNow you can deploy:\n\n```\n$ fly deploy\n```\n\nOpen your app:\n\n```\n$ fly open\n```\n\nIf you named your app `myapp` you will have the domains `https://myapp.fly.dev`\nand `https://myapp.fly.dev:9091`. Read more about how to change this on\n[fly.toml](fly.toml).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Ffly-app-with-multiple-internal-ports","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffly-apps%2Ffly-app-with-multiple-internal-ports","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Ffly-app-with-multiple-internal-ports/lists"}