Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

move from local xampp server to online server

I wrote an android app and for development, I used a local XAMPP server. On the server side I use a mysql db and a few php files that contain the queries. On the android side, I use HttpURLConnection as shown below

url = new URL(AppHelper.SERVER_URL + phpFile);
connection = (HttpURLConnection) url.openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
connection.setRequestMethod("POST");

request = new OutputStreamWriter(connection.getOutputStream());
request.write(parameters);
request.flush();
request.close();
String line = "";
InputStreamReader isr = new InputStreamReader(connection.getInputStream());
BufferedReader reader = new BufferedReader(isr);
StringBuilder sb = new StringBuilder();

Now I am at a stage where I would like some friends try out the app, so I want to set up a hosted webserver. Now I am hoping to get suggestions which service to use so that I can salvage and recycle most of my code and files. Please note that I am very unfamiliar with this, so user-friendliness is an important criteria. What are the preferred ways of moving from a local server to a hosted server solution?

like image 654
chrise Avatar asked Feb 07 '23 21:02

chrise


2 Answers

You can use any web hosting site, sign up there. and upload your all php files on that server. Create MySQL Database and create all necessary tables on Server.

Use Filezilla for syncing PHP files from server to local or vice-versa.

like image 191
Asif Patel Avatar answered Feb 09 '23 12:02

Asif Patel


You can use heroku for hosting your serverside app. You Just only have to follow the tutorials from heroku and you will get your serverside webservice running in minutes and get URL for your server side webservice.

here is documentation for heroku.

You can also use openshift alternatively.

As for me Heroku works well.

like image 41
WinHtaikAung Avatar answered Feb 09 '23 12:02

WinHtaikAung