socketsupply / socket-pipe

A high level module for using Node.js as a Socket Runtime backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple pipe that connects Node with Socket and shows you how to construct ipc messages for things like writing to stdout or setting the title of a window from Node.

import { Message } from '@socketsupply/socket-api/ipc.js'
import { Pipe } from '@socketsupply/socket-pipe'

const pipe = new Pipe({ json: true })

pipe.on('data', json => {
  pipe.write(Message.from('stdout', json))
})

About

A high level module for using Node.js as a Socket Runtime backend


Languages

Language:JavaScript 100.0%