UNPKG

fics

Version:

A promise-based interface for the Free Internet Chess Server

13 lines (10 loc) 357 B
/** * A very simple example that provides a connection to the FICS server as a * REPL interface. This pipes stdin from the process into the socket and * the socket into stdout. */ var FicsClient = require("./../"); var socket = (new FicsClient()).getSocket(); process.stdin.pipe(socket); socket.pipe(process.stdout); socket.on("close", process.exit);