skip to Main Content

I just made a simple chat-service with Node JS and I want to publish It " Online " ; at the time I used Ngrok and Localtunnel , but they are very limited , therefore I saw Apache web Server but I have not found tutorial on how to use it.

Thanks and hope you can help me.

2

Answers


  1. Ngrok and Localtunnel are services which let you open a connection from inside your network to an external server which then forwards traffic back down the tunnel so clients on the Internet can make requests to your service running inside your LAN.

    Apache is HTTP server software. It is nothing like Ngrok and Localtunnel.

    While you can set up a reverse proxy using it, for that to use useful in this use case you would have to install it in your router … and most routers don’t let you install software on them.

    You could possibly run it on a computer inside your LAN and then configure port forwarding on the router … but if you are going to do that then you might as well forget about Apache HTTPD and just forward traffic directly to the service you’ve written using Node.js.

    There are security risks and bandwidth considerations to take into account when running services from your LAN. It’s almost always a better idea to just invest in a proper hosting service like Amazon AWS, DigitalOcean Droplets, or Heroku.

    Login or Signup to reply.
  2. By "online" I suppose you mean to host it globally. For that my friend you will be in need of a server (preferably a cloude server) and a static IP address. Both of these are provided by a lot of providers like aws, digitalocean etc as a platform as a service, which we can leverage. So pls do the following:

    1. Register for a cloud service (aws, digitalocean, gcp etc.).
    2. Create a server instance of an operating system of your choice (my pref would be a linux instance).
    3. Attach a public static ip to the server.
    4. Log into the server. (SSH is the most secure way and most providers provide this to log into your server).
    5. Install dependencies (in your case NodeJS etc).
    6. Make sure that the port in which the app is hosted is open publicly. Most providers provide a dashboard in which you can configure port settings.
    7. Use Apache or Nginx for configuring a reverse proxy (this is just for keeping your environment secure)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search