Created
February 7, 2014 02:38
-
-
Save mwilc0x/8856555 to your computer and use it in GitHub Desktop.
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"), | |
http = require("http"), | |
app = express(), | |
port = process.env.PORT || 3000, | |
socketio = require('socket.io'), | |
imdb = require('imdb-api'); | |
app.use(express.static(__dirname + '/dist')); | |
var server = http.createServer(app); | |
server.listen(port); | |
console.log('http server listening on %d', port); | |
var io = socketio.listen(server); | |
io.sockets.on('connection', function(socket) { | |
var movie; | |
imdb.getReq({ name: 'The Toxic Avenger' }, function(err, things) { | |
movie = things; | |
console.log(movie); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment