nodejs 简单聊天应用

2015-08-26 • Node.JS2 Comments

/**
 * @desc 构建socket服务器
 * @anthor nocilol
 * @date 2015.8.25
 */
var http = require('http'), socketio = require('socket.io'), static_node = require('node-static');
var file = new static_node.Server('./public');
var server = http.createServer(init).listen(30001);

socketio.listen(server).on('connection', broadcast);

阅读更多...

粤公网安备 44011102000950号