13

I have a local server on which my two services are running on port 8000 and 5500. I would like to expose both ports to the outer world. For the same I am using ngrok to expose both the ports. But it is exposing only one port i.e.8000.

I tried writing a yaml file in which I have written both the ports which I want to expose.

authtoken: "token"
tunnels:
  first:
    addr: 8000
    proto: http
  second:
    addr: 5500
    proto: http

I would like to expose both the ports(i.e. 8000 and 5500) so that I can see both the services running. Please guide me if I am exposing it properly or is there a better way around.

ailin
  • 491
  • 5
  • 15
Gaurang Patel
  • 172
  • 3
  • 11

1 Answers1

1

One ngrok url can be bound to only one localhost app at a given time. It can't redirect traffic or deliver webhooks to two different localhost apps simultaneously.

Ngrok's job is simple - to redirect traffic from ONE ngrok url to ONE localhost - it will not help you if it's hard to register multiple urls.

Content of config file

authtoken: "token"
tunnels:
  app-foo:
    addr: 80
    proto: http
    host_header: app-foo.dev
  app-bar:
    addr: 80
    proto: http
    host_header: app-bar.dev

Start ngrok :

ngrok start --all
Bayu Dwiyan Satria
  • 986
  • 12
  • 28