javascript - nodeJs connection with MySql for androidStudio -


i'm trying connect mysql files java-script nodejs.

but want server apache send new data automatically app android.

for have table in database have name antenne return differents values of table. have script php connect app android , database script php isn't callback server

indeed want server push data in app android , not app android ask data server

my script java

var express =require('express'); var mysql=require('mysql'); var app=express();  var connect = mysql.createconnection({ //properties... host: 'localhost', user:'root', passeword;'root', database'antenne', });  connection.connect(function(error){  if(!!error){ console.log('error');  }else{   console.log('connected');  });    app.get('/',function(req,resp){   //aboutmysql   connection.query("select *from antenne"function(error,rows,fields))    if(!!error){        console.log('error in query');    }else{    console.log('sucessful query');  }); app.listen(80); 


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

How to understand 2 main() functions after using uftrace to profile the C++ program? -