New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@jamsocket/session-backend

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jamsocket/session-backend

A preview of the upcoming Jamsocket Backend SDK

latest
npmnpm
Version
0.0.5
Version published
Maintainers
0
Created
Source

Usage

import { JamsocketBackend } from '@jamsocket/session-backend'

const jamsocketBackend = new JamsocketBackend() // auto-configures itself from environment variables

// listenForRequests is assumed to start your application server on the given port. We can either do this
// before or after awaiting the key assignment, but we MUST be ready for requests on jamsocketBackend.port before
// we call assignment.ready().
listenForRequests(jamsocketBackend.port)

const assignment = await jamsocketBackend.assignment()

console.log('key', assignment.key)
console.log('backendId', assignment.backendId)

// Optionally, do some initialization work here based on the key or other fields of assignment.

assignment.ready()

FAQs

Package last updated on 16 Aug 2024

Did you know?

Socket

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.

Install

Related posts