
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
chef-socket
Advanced tools
static files server designed for node written in typescript, with tests
with web-sockets micro-service manager, at the same port
express
for routingsocket.io
for websocketshttps://chef-socket.pietal.dev/
$ yarn add chef-socket
$ yarn chef-socket node_modules/chef-socket/demo --plugin node_modules/chef-socket/chat.js
const { cook, chat } = require("chef-socket");
cook({
folder: "node_modules/chef-socket/demo",
plugins: { chat },
}).then((server) => {
console.log(server.config);
});
$ npx chef-socket folder [--plugin node_modules/chef-socket/chat.js]
const { cook } = require("chef-socket");
cook({ folder: "folder" }).then((server: Express.Application) => {
// server api is get, post, any
server.any("/*", (req: Express.Request, res: Express.Response) => {
res.end("200 OK");
});
});
folder
param is omitted default index.html
is read from folder = '.'
port
specifiedFor more information about config parameters read:
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.
socket.io-client
connects to location.origin.replace(/^http/, 'ws')
config.join
eventsjoin
event with room name (topic/plugin name)config.leave
)(ws, { id, event, data })
this
) of each plugin is the server
instance.type Event = {
id: string; // socket gains unique id on connection
event: string; // event name to send in frontend/receive in backend
data?: any; // defaults to undefined, can be serializable primitive or JSON
}
MIT
FAQs
static files server + websockets = chef-socket
The npm package chef-socket receives a total of 7 weekly downloads. As such, chef-socket popularity was classified as not popular.
We found that chef-socket demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.