Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 397 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 397 Bytes

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))
})