How to make my Ionic app backend work on android? - mongodb

I'm creating an app that uses Ionic and VueJS for the front-end, and for the back-end, Express and Mongoose.
When I run the file containing the express app, it creates a localhost on port 3000 and can handle POST & GET requests. The front-end make a http POST call on localhost:3000, using axios, to send data to the database.
On my PC it works well but when I deploy the app on android it does nothing.

Related

How to send data from an electron app using a socket to a flask app on heroku

I want to send data from my electron app using socket.io to a website I created using flask and hosted on heroku. I want to know how to send data to an external website using socket.io.

how to make a browser application,android application and ios application in a single stretch

Can anyone suggest me how to make a hybrid app where i am using from as ionic and backend mongodb and server as node
running the node in server automatically stated my ionic front end page and everything works fine in the browser
but while running ionic serve --lab it is not connecting to server
i already successfully implemented the browser application using the above but while making .apk file i am not able to connect to the server
can any one suggest a solution for this
hi finally found the solution done the server using REST API and front end as ionic which is connecting to the REST API

How to access local mysql from chrome packages app

I am developing a chrome packaged app. There is already an VB application running with mysql. I want to access the same database but use chrome packaged app as client.
How to access local mysql server from chrome packages app using javascript ?
I am aware of IndexedDB.
You have two options:
Create a web service (e.g. some PHP pages) that talks to MySQL and allows your app to use it as a go-between
Write your own MySQL driver/communicator to communicate with it directly: http://developer.chrome.com/apps/socket.html
The first is the easiest and would take the form:
Your chrome app would use AJAX to communicate with the PHP pages (probably via "POST")
Your PHP pages would expect it to login, use SSL and then use a token to continue identification during a session
The PHP would have generic capabilities to do CRUD actions
The PHP would spit back JSON for the results
but the second option would make you a hero if you took the time to develop that and put it on sourceforge or github under a permissive open source license.

How to structure a flask restful api with an angularjs client-side app?

How can I get both the flask api and the angular app running on the same web-server? Right now I am stuck running the flask-api on one server and the angular app on a separate node web-server (using the angular seed project). This seems less than ideal.
Im currently in the development stages but I am using similar stack. You are right flask needs to be used on a different port, but simply just wrap your api responses around with "(" ")". So that on the angular.js you can accept JSONP and use the flask api responses.

Making a GWT app work on my mobile using phoneGap

When you create a GWT app you can run it as a web application and point your browser to the home page and it works. Now, in this case your browser is being served the Javascript from the server and thus all calls to the server from your Javascript work fine.
But, if you then take the generated Java script and rather than have it server from the server just have it saved locally how would you go about getting your server calls to work. Say your server is running on localhost how do you get this to work. What I am trying to do is take a working GWT app and extract the generated Java script and wrap this in a phoneGap enabled app but I can't get my server calls to work.
Instead of trying adhoc approach. You should be looking at options provided by MGWT and PhoneGap - Reference http://www.m-gwt.com/.