fapsock

1.3.2 • Public • Published

fapsock

Synopsis

Socket client will connect to a socket server running on the specified port.

Installation

	npm install --save fapsock

Usage

	import Fapsock from 'fapsock'

	# Accepts a JavaScript object as an argument:

	const options = {
	  socketPort: process.env.SOCKET_PORT,
	  logger: winston,
	  hostname: process.env.HOSTNAME,
	  packageName: pkg.name,
	}
	
	const fapsock = new Fapsock(options)
	
	fapsock.on('connected', () => {
		console.log('connected')
	}
	
	fapsock.emit('hello', 'hello')
readme v1.3.2

Readme

Keywords

none

Package Sidebar

Install

npm i fapsock

Weekly Downloads

1

Version

1.3.2

License

MIT

Last publish

Collaborators

  • mprather