Welcome! Log In Create A New Profile

Advanced

node.js help

Posted by destramic 
node.js help
September 06, 2015 03:51PM
i have node.js installed on my localhost as well as the mysql module.

when running in command promt:

var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Node is working!\n');
}).listen(3000, '127.0.0.1');

i get the result in 127.0.0.1:3000 as expected

what i want now is to be able to connect to my mysql module from client....i see people tend to include mysql module like so

<script src="127.0.0.1:3000/mysql.js"></script>

how is this possible please?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 335
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready