-1
I’m new to nodejs, I’ve always used php with mysql and I’m migrating to Node but I have some problems, make the Node connect in the database works perfectly however I get no success when trying to run straight by Chrome returns the error Net.createConnection is not a Function, as I am not so aware I don’t know if I need a framework to manage the application so that the browser understands the select’s without error, to require them to work I am using Browserify my code js
 var $ = require('jquery');
 var mysql = require('mysql');
 var con = mysql.createConnection({
 host:'localhost',
 port:'0000',
 user:'root',
 password:'123456',
 database:'qualquer'
 });
con.connect(function(err) {
if (err) throw err;
 con.query("select * From qualquer.teste", function (err, result, 
fields) {
if (err) throw err;
console.log(result);
});
connection.end();
});""
But you’re trying to use one server plugin customer? It won’t work.
– Augusto Vasques
I am not, I want to use the serve so that the client can run when I run the application
– FireWallSP
Got it, you want to make session-based server equal to ASP and PHP, where the client only passes an HTTP request containing the session id. Have you met the Express
– Augusto Vasques
Yes in this parameter that I look for, hear about it I will take a better look at it recommend some site in particular ? I will be very grateful
– FireWallSP
The link I gave you is the official website in Portuguese. I believe this component helps you Express-Session
– Augusto Vasques