0

Currently, I am trying to host my app on my company local network. I realised that when I connect to my company Wifi, different devices connected to the same WiFi network, have different IPv4 Address. I want to be able to host this app such that all the devices connected to the same Wifi network be able to access the app. May I know how should I proceed with this issue?

I was only able to listen from the IP where my server is running.

Your help will be very much appreciated. Thank you

  • Get a static IP or connect by name which the DNS will resolve dynamically. – VLAZ Jul 22 '19 at 12:18
  • Set Static Ip on system and run nodejs on that. In your app, use ip:port as base url. Also handle cors. – RITESH ARORA Jul 22 '19 at 12:19
  • listen on `0.0.0.0:port` – agtabesh Jul 22 '19 at 12:29
  • Hi thanks for the comments, but do you mind elaborating the solution to setting a Static IP to the system and how will this resolve my issue? Sorry for asking this as I do not have a programming background and I really appreciate your help. – Wei Jian Ng Jul 22 '19 at 13:10

1 Answers1

0

You should install http-server on npm.

Run http-server <./path/to/thing>

You can read more about it on: https://www.npmjs.com/package/http-server

Olympiloutre
  • 2,268
  • 3
  • 28
  • 38
Evan
  • 1