-1

I made a webapp with HTML, CSS, Javascript and Java backend and whenever I run the index.html from a project on Netbeans I'm accessing the localhost:80. But I want to run this localhost on my Android. Of course I added the port 80 on my Firewall and accessed the site on my mobile with IP address and port together. But it will only show the webapp when my PC is running.

Now I want to make this localhost 'online' but only visible or accessible on my Android device without the need to constantly leaving my PC on so I'm wondering if you guys could help me out.

Bob
  • 3
  • 3
  • If you are able to change the ip:port to use `0.0.0.0:8000`. if using a windows machine, go to terminal and type ipconfig, the IPv4 address would enable you to access it via `x.x.x.x.:8000` – tushortz May 25 '17 at 11:09

2 Answers2

1

You can host your webapp in online hosting platform. There are many hosting services are available in Internet even freely.

You can use web services for securely access your webpage with your mobile app using security paramters or protect your web application using password using .htpasswd file.

enter image description here

Password protection for web application

Hosting Service

JEGADEESAN S
  • 566
  • 1
  • 6
  • 19
0

You can access the web app only when your system is running. because that is where your web application is running. If your system is not running thats it. You can't access your web app.

Anto Antony
  • 842
  • 6
  • 12
  • Is there any way to make a website work on Android without having my PC run? – Bob May 25 '17 at 11:18
  • I did't get that. What are you trying to build? – Anto Antony May 25 '17 at 11:21
  • if you want to build an application that runs on every platform, we usually create a cordova application. First we will create a web application using html, css, javascript(angularjs or any other frameworks) and we will wrap this application using cordova. Please google cordova for more information – Anto Antony May 25 '17 at 11:23
  • I'm trying to make my web application into a native Android app but only for me and not available on Play Store. But the problem is that whenever I run a project, it opens with localhost as URL. Therefor I need to make that localhost somewhat public so I can make that web into a native app on my Android. – Bob May 25 '17 at 11:27
  • I think you need to host your project in online. Unless you can't access your website – Anto Antony May 25 '17 at 11:28