Skip to content

Instantly share code, notes, and snippets.

@chihebnabil
Created August 25, 2016 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chihebnabil/afe8dd601f5456535386ef8ac3481c2b to your computer and use it in GitHub Desktop.
Save chihebnabil/afe8dd601f5456535386ef8ac3481c2b to your computer and use it in GitHub Desktop.
this is not the finale server.js
var http = require('http');
var fs = require('fs');
var ent = require('ent')
var mysql = require('mysql');
var server = http.createServer(function(req, res) {
fs.readFile('./index.php', 'utf-8', function(error, content) {
res.writeHead(200, {"Content-Type": "text/html"});
res.end(content);
});
});
io = require('socket.io').listen(server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment