Socket
Book a DemoInstallSign in
Socket

console-to-terminal

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-to-terminal

Small utility to redirect console calls to HTTP requests and show output in terminal

1.1.1
latest
Source
npmnpm
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

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 yarn to install dependencies
  • Run yarn start to start server. By defaut it is run on localhost:8765. Host and port could be modified if server started with yarn start port or yarn 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.

FAQs

Package last updated on 30 Aug 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.