0
votes

I am using worklight 5.0.6 in Eclipse juno on Windows 7.

I made a simple form filling app. I am deploying this app on my PC, Making it a worklight server. I am accessing it from the instance of the app which is running on my phone.

It works fine as long as my Phone and PC are on the same network, that is, on local LAN.

But when I change the network to Internet, the app is not able to connect to the worklight server - which is, again, my PC.

My Questions are:

  1. Where should i put the public IP address to access the worklight server?
  2. Should i change the worklight version to make it work?

Also, I read solutions that you gotta run the "Build and deploy on remote servers" But i couldn't find the option for it, what i found was "Run on Server"

But i really don't know how to proceed after that.

1

1 Answers

0
votes

Should i change the worklight version to make it work?

You should upgrade your Worklight from 5.0.6 to a later release regardless of the connectivity problem - it is a very, very, old release.

Also, I read solutions that you gotta run the "Build and deploy on remote servers" But i couldn't find the option for it, what i found was "Run on Server"

This is not related to what you are facing. This option is meant to be used as you prepare to move the development environment (the developer workstation) to other environments, such as QA, UAT and Production. This feature is meant to change the connectivity settings in the application. Again, not relevant for you at this time.

But when I change the network to Internet, the app is not able to connect to the worklight server - which is, again, my PC.

The problem you are experiencing is expected. There is your PC, which acts as the local server, connected to the Internet via your router. And there is the device, also connected to the same network via the router.

As you disconnect the device from the local network, it is no longer able to connect to the server, which is still in the local network.

If you want that work still, you'd need to setup a server with an external IP address that your device will attempt to connect to, and be able to route the request to the Worklight Server... in short, in a development environment it is expected that you will be on the same network.