Skip to content

Instantly share code, notes, and snippets.

@ilagnev
Created January 16, 2018 16:40
Show Gist options
  • Save ilagnev/da7b67ce5e83386f63173bfe98346138 to your computer and use it in GitHub Desktop.
Save ilagnev/da7b67ce5e83386f63173bfe98346138 to your computer and use it in GitHub Desktop.
lazy test task solution for nodejs course
const WebSocket = require('ws');
const rpn = require('rpn');
const ws = new WebSocket('ws://rpn.javascript.ninja:8080');
ws.on('message', data => data.includes('Token') && !console.log(data) || ws.send(rpn(data)));
@ilagnev
Copy link
Author

ilagnev commented Jan 16, 2018

screen shot 2018-01-16 at 18 31 40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment