
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
lark-websocket
Advanced tools
A light-weight websocket framework based on Node.js. Provides an easy way to build services with raw WebSocket protocol
Websocket webserver framework in nodejs. Under development, unstable
npm install lark-websocket
The following example creates a new websocket server, and send a message back when received one
var ws = require('lark-websocket');
ws.createServer(function(client, request){
client.on('message',function(msg){
client.send("Received you message : " + msg);
});
}).listen(8023);
Attach websocket server to an HTTP server
require('lark-websocket');
var http = require('http');
http.createServer(function(req,res){...})
.acceptWebsocket(function(client, request){...})
.listen(8023);
Note that requiring websocket will extend require('net').Server with acceptWebsocket. I'm still considering, maybe will remove this later
You can extend/modify lark-websocket directly, or use the following syntactic sugar:
var websocket = require('lark-websocket');
websocket.extend(function(ws){
ws.sayHello = function(){...};
});
By default lark-websocket has been extended with application, router and group
Inherits events.EventEmitter, encapsulated socket.
new Client(socket) to create a new clientclient.send send a message, emit sendclient.receive to receive frames. Usage client.receive(callback), callback is called when a frame received, emit receiveclient.message to receive message. Usage client.receive(callback), callback is called when a text frame received, emit messageclient.ping to ping. Unfortunately, no events for this actionclient.close to close, emit closeerror, emit when socket event error emittedFAQs
A light-weight websocket framework based on Node.js. Provides an easy way to build services with raw WebSocket protocol
The npm package lark-websocket receives a total of 8 weekly downloads. As such, lark-websocket popularity was classified as not popular.
We found that lark-websocket demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.