Developing Simple node.js Web Application on Our Desktop <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>

We can easily set up an up and running HTTP server on our desktop that runs a web application developed in node.js. We just need to write our code in a separated JavaScript file and execute it. var http = require(‘http’); var server = http.createServer(function (req, res) { res.writeHead(200, {‘Content-Type’:’text/plain’}); res.end(‘Hello World!\n’); }); server.listen(1400,’127.0.0.1′); The following video clip […]

Using node.js with MySQL <font size=-2><a href=http://www.lifemichael.com/en/?page_id=73 target=_blank>PRO</a></font>

Developing a web application using the node.js framework we can easily write code that connects with a MySQL database. The mysql module provides us with everything we need. The following code sample shows how simple it is to use this module. var mysql = require(‘mysql’); var connection = mysql.createConnection({ host: ‘server.zindell.com’, user: ‘nodejsdemo’, password: ‘lifemichael’, […]