
Research
/Security News
Coruna Respawned: Compromised art-template npm Package Leads to iOS Browser Exploit Kit
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.
web-sockets micro-service manager and static files server at the same port,
designed for node written in typescript, with tests
uWebSockets.js for serving files and websockets$ npx chef-uws folder [--debug] [--ssl] [--port 443] [--plugin path/to/plugin.js]
$ yarn add chef-uws
https://chef-js-uws.herokuapp.com/
$ yarn add chef-uws
$ yarn chef-uws node_modules/chef-uws/demo --plugin node_modules/chef-core/chat.js
Minimal configuration is specifying folder, then it serves it from http://localhost:4200
const startServer = require("chef-uws");
const config = { folder: "docs" };
startServer(config).then((server: uWS.App | uWS.SSLApp) => {
// server api is get, post, any
server.any("/*", (res: uWS.HttpResponse, req: uWS.HttpRequest) => {
res.end("200 OK");
});
});
For more information about config parameters read:
The default configuration https://github.com/chef-js/core#configuration
The parameters types https://chef-js.github.io/core/types/Config.html
The plugins are a mighty thing, think of them like chat rooms,
after a client handshakes the chat room, his messages start being forwarded to that room,
and it is being handled there by the room's own plugin.
This means you can have for example: a chat server and other unrelated websocket services
at the same port as the files server too. One client may be in many rooms.
websocket connects to location.origin.replace(/^http/, 'ws')config.join eventsjoin event with room name (topic/plugin name)config.leave)(ws, { id, event, data }) that is called each time the frontend websocket emits to serverthis) of each plugin is the server instance.{
id, // WebSocket id - this is automatically added
event, // event name as string
data, // any data accompanying the event
}
front-end websocket client for uWebSockets.js with same API as socket.io-client:
<script src="https://unpkg.com/chef-uws@latest/client.js"></script>
you can use it like this:
const UWebSocket = require("chef-uws/client");
// will connect to ws:// or wss:// protocol depending on ssl enabled or not
const ws = new UWebSocket(location.origin.replace(/^http/, "ws"));
ws.on("connect", () => {
// after connect, join a plugin (chat) - emit "/join" event with data = "chat"
ws.emit("/join", "chat");
});
ws.on("disconnect", () => {
// your socket got disconnected
});
ws.on("/join", (id, event, data) => {
// socket with id joined plugin, first join sets your socket's id
ws.id = ws.id || id;
});
ws.on("/leave", (id, event, data) => {
// socket with id left plugin
});
ws.on("example", (id, event, data) => {
// handle event with "example" name
});
ws.onAny((id, event, data) => {
// handle all incoming messsages
});
MIT
FAQs
chef-js + uWebSockets.js = static files server + websockets
The npm package chef-uws receives a total of 66 weekly downloads. As such, chef-uws popularity was classified as not popular.
We found that chef-uws demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.

Company News
As AI accelerates how code is written and shipped, Socket is scaling to protect the software supply chain from the growing wave of attacks targeting open source dependencies.

Company News
Socket is scaling to defend open source against supply chain attacks as AI accelerates software development.