Skip to content
/ console.ws Public

WebSocket powered remote console.log() for Node.js

Notifications You must be signed in to change notification settings

kuy/console.ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM Package Travis Dependency Status

console.ws

WebSocket-powered lightweight remote console.log() for Node.js.

Install

npm install --save-dev console.ws

Usage

1. Start console.ws server

./node_modules/.bin/console

2. Use in your code

import console from 'console.ws';

console.log('Hello Console!');

Why?

I'm using for debugging of before/after hooks in WebdriverIO's config file. In wdio.conf.js file, the output from console.log() is not captured and shown in the terminal.

FAQ

Lightweight?

console.ws depends on WebSocket implementation ws module, not Socket.IO.

Module not found: Error: Cannot resolve module 'tls'

If you're using webpack, please tweak your webpack.config.js file to ignore console.ws and tls modules because Webpack can't handle some native modules correctly.

Here is the error detail.

ERROR in ./~/ws/lib/WebSocketServer.js
Module not found: Error: Cannot resolve module 'tls' in /path/to/project/node_modules/ws/lib
 @ ./~/ws/lib/WebSocketServer.js 15:10-24

Limitation

You can't use console.ws on browsers. The both client and server must be run on Node.js.

API

Note: Not enough compatibility with Console API

console.log(msg)

Author

Yuki Kodama / @kuy

License

MIT

About

WebSocket powered remote console.log() for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published