Node.JS Server SockJS-node

码农软件 · 软件分类 · Node.js 扩展 · 2019-04-16 19:43:26

软件介绍

SockJS-node is a Node.js server side counterpart of SockJS-client browser library written in CoffeeScript.

To install sockjs-node run:

npm install sockjs

(If you see rbytes dependecy failing, don't worry, it's optional, SockJS-node will work fine without it.)

An simplified echo SockJS server could look more or less like:

var http = require('http');
var sockjs = require('sockjs');

var echo = sockjs.createServer();
echo.on('connection', function(conn) {
    conn.on('data', function(message) {
        conn.write(message);
    });
    conn.on('close', function() {});
});

var server = http.createServer();
echo.installHandlers(server, {prefix:'/echo'});
server.listen(9999, '0.0.0.0');

本文地址:https://codercto.com/soft/d/3731.html

Don't Make Me Think

Don't Make Me Think

Steve Krug / New Riders Press / 18 August, 2005 / $35.00

Five years and more than 100,000 copies after it was first published, it's hard to imagine anyone working in Web design who hasn't read Steve Krug's "instant classic" on Web usability, but people are ......一起来看看 《Don't Make Me Think》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试