1.1.1 • Published 7 years ago
console-to-terminal v1.1.1
console-to-terminal
console-to-terminal is a small utility to redirect console output (log, warn, error, info or trace) to the terminal. It is really handy while debugging web applications without a possibility to check console in DevTool (Chrome on iOS or custom "native" browsers on Androids).
Usage
- Clone repo and run
yarnto install dependencies - Run
yarn startto start server. By defaut it is run onlocalhost:8765. Host and port could be modified if server started withyarn start portoryarn start host:port. - Add
<script src="http://my-local-ip:port/console-hook.js"></script>to your web application's entry point. It will install custom hooks for console methods and will make requests to running server. - In case you want to load hooks script from your own endpoint, you need to specify
window["__consoleToTerminalLocation__"]object with host and port properties. E.g.,window["__consoleToTerminalLocation__"] = { host: "127.0.0.1", port: 8000 }.
Demo
Simply run server as described in Usage section and navigate to http://host:port/demo (http://localhost:8765/demo) by default.