https://gibme-npm.github.io/tcp-server/
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);
})();