This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); // require express module | |
var app = express(); // references and creates a new express app | |
var serv = require('http').Server(app); //require http module with express application info | |
app.get('/', function(req, res) { | |
res.sendFiles(__dirname + '/client/index.html'); | |
}); | |
app.use('/client', express.static(__dirname + '/client')); | |
serv.listen(2000); | |
console.log("Server started."); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install socket.io | |
npm install express |