
Product
Introducing Scala and Kotlin Support in Socket
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
@logux/server
Advanced tools
Build own Logux server or make proxy between WebSocket and HTTP backend on any language
Logux is a new way to connect client and server. Instead of sending HTTP requests (e.g., AJAX and GraphQL) it synchronizes log of operations between client, server, and other clients.
This repository contains Logux server with:
import { fileURLToPath } from 'url'
const server = new Server(
Server.loadOptions(process, {
controlSecret: 'secret',
subprotocol: '1.0.0',
supports: '0.6.2',
backend: 'http://localhost:3000/logux',
fileUrl: import.meta.url
})
)
server.listen()
import { fileURLToPath } from 'url'
import { isFirstOlder } from '@logux/core'
import { dirname } from 'path'
import { Server } from '@logux/server'
const server = new Server(
Server.loadOptions(process, {
subprotocol: '1.0.0',
supports: '1.x',
fileUrl: import.meta.url
})
)
server.auth(async ({ userId, token }) => {
const user = await findUserByToken(token)
return !!user && userId === user.id
})
server.channel('user/:id', {
access (ctx, action, meta) {
return ctx.params.id === ctx.userId
},
async load (ctx, action, meta) {
const user = await db.loadUser(ctx.params.id)
return { type: 'USER_NAME', name: user.name }
}
})
server.type('CHANGE_NAME', {
access (ctx, action, meta) {
return action.user === ctx.userId
},
resend (ctx, action, meta) {
return { channel: `user/${ ctx.userId }` }
},
async process (ctx, action, meta) {
if (isFirstOlder(lastNameChange(action.user), meta)) {
await db.changeUserName({ id: action.user, name: action.name })
}
}
})
server.listen()
FAQs
Build own Logux server or make proxy between WebSocket and HTTP backend on any language
The npm package @logux/server receives a total of 727 weekly downloads. As such, @logux/server popularity was classified as not popular.
We found that @logux/server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.
Application Security
/Security News
Socket CEO Feross Aboukhadijeh and a16z partner Joel de la Garza discuss vibe coding, AI-driven software development, and how the rise of LLMs, despite their risks, still points toward a more secure and innovative future.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.