Expose a local webserver(localhost:3000) to the internet
Sharing work in progress to clients / within the team, then following packages are very useful to expose local servers behind NATs and firewalls to the public internet over secure tunnels.
This application will be useful if we create a website on our local development server for a client. At some point, he will want to see how the work goes. If so, we could host the website on an online server, so the clients can see it.
So here, I am using localtunnel we can expose our localhost to the world for easy testing and sharing! No need to mess with DNS or deploy just to have others test out your changes.
In the following article, we are going to take a look at Localtunnel.To start with, I will show you the demo using react library. Localtunnel is installed on our system through node.js as below:
So you can immediately start the app by going into the newly created application folder and running npm start.
lt –port 3000 //this command will get the unique URL so that our local system is accessible from anywhere
lt –port 3000 –subdomain cdkapptodo // will have the option to use a subdomain to easier to remember
This application will allow us easily share the webserver of our local development team