Skip to content

mprather1/fapsock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Create socket server

Resources

Stars

Watchers

Forks

Packages

No packages published