1.1.2 • Published 6 years ago

@cxm/logsync v1.1.2

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

LogSync

  • Backend remote string console tool by socket.
  • It's easy to use.
  • Simple, Light tool.

NPM version License npm node

Installation

npm i @cxm/logsync

Usage

For the client

  • Initial LogSync and put log code in any line.

    //init client
    const LogSync = require('@cxm/logsync');
    
    const logSync = new LogSync({
      host:'localhost',
      port:8080
    });
    
    //send debug string to the server console
    logSync.log( Math.random() );

For the simple server

  • Install socket.io first.

    	   npm i socket.io --save
  • Config server

    const server = require('http').createServer();

    const io = require('socket.io')(server);

    io.on('connection', client => {
      client.on('log', data => console.log( data ) );
    });

    server.listen(8080);
1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago