1.3.2 • Published 7 years ago

mter-rs v1.3.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

mterminal-remote-server

capture your terminal logs, and send to network by udp. you can use mter to get those logs and print.

why

Normally, your nodejs application will mix the logs of the master process and the cluster process in one terminal to print. In development mode, this can cause confusion. We need need a tool to separate these logs into different places for printing. so here you are.

usage

  1. write your code.
import { setupMter } from '../src/';

setupMter();
  1. install and run mter.
# install 
npm i -g mter
# start the server
mter 
  1. start you app.
MTER="*" node your-app.js

API

setupMter(opt?:MterOptions)

MterOptions

  • keep_stdout?: boolean,
  • process_name?: string,
  • recipient_port?: number,
  • heartbeat_udp_port?: number,
  • default_bind_udp_port?: number,
  • bind_udp_port_lock_file_name?: string,

normally, you only need config: keep_stdout. if true, the log will keep print in you terminal, and broadcast at the same time.

in mter api, you can get the debugging process name by api:http://127.0.0.1:4510/api/wss. but you maybe see like this:{"list":[{"path":"/wss/4869","process_name":"MASTER-test2.ts-9885"},{"path":"/wss/4870","process_name":"CLUSTER-test2.ts-9891"}]}, you can config the process_name to change. this can improve readability.

1.3.2

7 years ago

1.3.0

7 years ago

1.2.0

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago