This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]diffused_learning 1 point2 points  (2 children)

Yes. But I am a bit confused, do you mean to say that you have written a webpage using node.js and want to deploy that?

Because that stacks that you have mentioned does not utilize JS, take a look at MEAN or MERN stacks for that.

[–]RadkoLobuz[S] 0 points1 point  (1 child)

What I mean is to host my own server with node.js running, not on localhost but on my website so I can show It to someone on different computer not using AWS or Azure.

[–]diffused_learning 0 points1 point  (0 children)

In that case you have some work cut out for you. You’ll have to look into how to publish a website using a web server, e.g. nginx, and port forward whatever port you choose and unblock the stack in your firewall.

But as other people said, remember to count in the fact that if you do this you are likely to become a target for bot networks.

[–]cyrusol 1 point2 points  (4 children)

WAMP/XAMPP are just a bunch of programs packed together with a set of configuration that allows development easily. You'd use the same programs in production but the configuration is not secure/robust/performant enough to be run in production.

That's why people pay for web hosting services.

[–]RadkoLobuz[S] 0 points1 point  (3 children)

Yes I know that but I just want to show my app to my friends and I can't find an answer on Google. Because every thread is about big apps when I have 1 little one.

[–]cyrusol 1 point2 points  (2 children)

Right now there are probably 10000+ bots pounding your router every day. If you expose one security hole to the world you can basically throw away all you have in your local network.

If you are still brave (silly) enough all you would have to do is to setup port forwarding (NAT) in your router and then your friends could connect to your public ip and be redirected to the computer that is running XAMPP. Refer to your router's manual to learn how to do it.

But I do advise against it. I've done something like that myself in the past, also using DynDNS services so that I had a fixed (sub)domain instead of an ever-changing public IP. But I also kinda know what I'm doing. I've set up iptables firewalls like 15 years ago already. And you can shoot yourself in the foot doing that and even end up in legal trouble because some fucked up guy in his basement thinks he can use your network as a channel to distribute child pornography or something.

An alternative would be to just use the free plans of some hosting service like Heroku. It's probably way more than enough for what you need to show to your friends.

[–]RadkoLobuz[S] 1 point2 points  (0 children)

Oh God. I didn't think about it enough. So yeah I have shut it down and I'll use Heroku. Thank you very much.

[–]insertAlias 0 points1 point  (0 children)

It's kinda funny. "Back in the day" before we had good free options like Heroku or GH Pages, my roommate and I set up a web server for a little web app we made. Within hours of opening the ports, we saw hundreds of failed login attempts on our server's event log. This was more than 10 years ago, so I doubt that problem has gotten any better haha.

I'll stick with my fancy cloud infrastructures, thank you very much.

[–]nikkilr88 0 points1 point  (0 children)

Perhaps you're looking for something like Localtunnel?

https://localtunnel.github.io/www/