So me and my friend are working on a MERN Stack app, I am working on backend(Node.js) and he is working on Frontend(React.js). We are from different places, My Question is how he can access my localhost server, So as to hit on my APIs. Provide me with all the possible solutions so that my APIs are always available to him.
You need something like this: https://ngrok.com/
Its has a free plan, or you can pay for extra features like setting a custom domain
You can install ngrok as a global npm package with:
npm i -g ngrok
And then once your server is running locally, you can start ngrok in another terminal pane/window/session and point it to the port your server is running on, below we assume the port is ‘3000’:
ngrok http 3000
This will open the tunnel, and print a url you can send to your friend to make requests against. Requests made to the url will be proxied to your localhost at the specified port. It supports HTTPS as well.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With