-
-
Save knyga/3c2934e41babb3fe40e8254b0968b7e4 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
const express = require(‘express’); | |
const app = express(); | |
const http = require(‘http’).Server(app); | |
const io = require(‘socket.io’)(http); | |
// middleware for static processing | |
app.use(express.static(__dirname + ‘/static’)); | |
// web socket connection event | |
io.on(‘connection’, function(socket){ | |
console.log(‘connection’); | |
}); | |
http.listen(3000, function(){ | |
console.log(‘listening on *:3000’); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment