How to Host Localhost Globally Using Microsoft Dev Tunnels (Complete Guide)

12 hours ago 8

These are examples, not fixed requirements. Always check the actual URL printed by your development server. For this tutorial, we will use port 3000.Step 4: Host Localhost GloballyOpen a second terminal while keeping your application running. Execute:devtunnel host -p 3000This command asks Dev Tunnels to create a temporary tunnel for the local service listening on port 3000. If everything works, the CLI prints a tunnel ID and one or more URLs.An illustrative URL might look like this: https://example-3000.devtunnels.ms/Your actual tunnel ID and URL will be different. Open the displayed URL in your browser to test the connection.What if your application uses another port?Replace 3000 with the port your application actually uses. For a Vite application running on port 5173:devtunnel host -p 5173For a Java Spring Boot API running on port 8080: devtunnel host -p 8080For an application using ports 3000 and 8080 simultaneously:devtunnel host -p 3000 8080The corresponding local services must already be running, and each port should use the appropriate protocol. Step 5: Understand the devtunnels.ms URLOne of the most useful parts of Dev Tunnels is the URL generated for your local applicatio...

Read Entire Article




피플앤툴즈 네트워크
🛍 샵