Prolog Programmer
Prolog Programmer

Reputation: 31

nodejs hosting from my laptop

I have a website that uses nodejs with express. The website is working fine on my localhost. I am not able to find a way to host the website from my laptop i.e. allowing external users to connect to it remotely. I wanted to check if this is possible. I am using windows 7.

I used to do the same job with php however, I used wamp server. Is there a similar way for nodejs?

Thank you

Upvotes: 0

Views: 987

Answers (2)

Jeremy Foster
Jeremy Foster

Reputation: 4763

I use ngrok. You go to ngrok.com and download the client. Then you can do a quick and easy command from your shell and tell ngrok to open the port you are running your Node site on. Something like...

ngrok http 3000

Upvotes: 1

Brad
Brad

Reputation: 163293

I used to do the same job with php however, I used wamp server. Is there a similar way for nodejs?

It's identical. Assuming Node.js is listening on the correct interfaces, there is no reason why you can't forward a port in from your router to your server on your laptop.

Upvotes: 2

Related Questions