@gibme/tcp-server
v1.0.10
Published
Lazy wrapper for TCP server(s)
Downloads
10
Readme
Simple TCP Server Wrapper
Documentation
https://gibme-npm.github.io/tcp-server/
Sample Code
import { createServer } from '@gibme/tcp-server';
(async () => {
const server = createServer();
server.on('connection', socket => {
socket.on('data', payload => {
// do something useful
console.log(payload.toString());
});
})
await server.start();
console.log('Server started on %s:%s', server.bindIP, server.bindPort);
})();