I am using node.js for an application, I'm also using mysql to allow users to connect on the app.
I was using the application on local, and it was working pretty well, no crash, nothing bad.
Today I tried to put the js server on my dedicate server and the client on my web server.
Now that it is uploaded, I try to launch the server, but it crashes after a few seconds with these tracebacks :
events.js:48
throw arguments[1]; // Unhandled 'error' event
Error: Connection lost: The server closed the connection.
at Protocol.end (/root/node_modules/mysql/lib/protocol/Protocol.js:73:13)
at Socket.onend (stream.js:80:10)
at Socket.emit (events.js:88:20)
at TCP.onread (net.js:388:51)
The connection code is simple :
var mysql = require('mysql');
var connection = mysql.createConnection({
host : 'hostname',
user : 'username',
password : 'password',
database : 'database',
});
connection.connect();
I tried to add a column into my db just after the connection and it works fine, my database which is on a different server than the js server accepts the connection and adds the column.
I don't know why I don't have these errors while I'm working on local...
I have the following controller action: var fileName = "monthly_report.pdf" var document = new Document(); //DO SOME STUFF WITH THE DOCUMENT MemoryStream stream = new MemoryStream(); ...
I have the following controller action: var fileName = "monthly_report.pdf" var document = new Document(); //DO SOME STUFF WITH THE DOCUMENT MemoryStream stream = new MemoryStream(); ...
I am now using Semantic UI without including Bootstrap as there are some conflicts among them. But I quite like the Carousel function of bootstrap. Can I optionally include it in my project? Thanks a ...
I am now using Semantic UI without including Bootstrap as there are some conflicts among them. But I quite like the Carousel function of bootstrap. Can I optionally include it in my project? Thanks a ...
I have this: personname: function(value, element) { return this.optional(element) || /^[a-zA-Z\s]+$/.test(value); } But when the name is Pëter Müller or something like that it is invalid, how ...
I have this: personname: function(value, element) { return this.optional(element) || /^[a-zA-Z\s]+$/.test(value); } But when the name is Pëter Müller or something like that it is invalid, how ...
I've been given the task of updating some Javascript for IE10. I've searched endlessly for a solution, but I just can't seem to find one. The piece of code I'm stuck at is: var svgns = "http://www.w3....
I've been given the task of updating some Javascript for IE10. I've searched endlessly for a solution, but I just can't seem to find one. The piece of code I'm stuck at is: var svgns = "http://www.w3....