npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@tidejs/devtools-backend

v0.0.4

Published

A Node.JS implementation of the devtools backend for debugging arbitrary web platforms

Downloads

7

Readme

DevTools Backend

A Node.JS implementation of the Chrome DevTools backend for debugging arbitrary web platforms (e.g. HbbTV applications on Smart TVs). It is the counterpart of the devtools-frontend and is like weinre just in "new".

Requirements

Installation

To run the server you need to first clone the repo and install all its dependencies:

# clone repository
$ git clone [email protected]:christian.bromann/devtools-backend.git
$ cd devtools-backend
# install dependencies
$ npm install
# build project
$ npm run build

Then start the server by executing:

$ npm run start

You now have started the server on localhost:9222. You can see a list of inspectable pages on http://localhost:9222 (also available as json).

Instrument Your Web Application

The DevTools Backend allows you to instrument your app in two different ways. You can either inject a script manually into your app or use the proxy to automate the injection.

Manual Script Injection

To manually inject a script put the following script tag at the top of your page:

<script src="http://localhost:9222/scripts/launcher.js" data-origin="debugger"></script>

Once you open a page with a web client (like a browser) it should register your page and it should then be inspectable.

Proxy Script Injection

If your web client supports proxy settings you can also use the DevTools backend as HTTP proxy (note that this only works for pages served via http on port 80). Per default the server starts with the hostname of the machine it runs on. For example if you run the project on localhost and setup Firefox to proxy request to localhost:9222 it would allow to debug the Firefox browser with the DevTools application.

Firefox Demo

Logging

For debugging purposes you can set a logging path as environment variable and the DevTools Proxy will dump all log messages to multiple files within this directory. To set a logging directory just export LOGGING_PATH:

export LOGGING_PATH=/home/user/logs
# or start the server with that environment variable set
LOGGING_PATH=/home/user/logs npm run start

Development

To recompile files automatically run:

$ npm run dev

After files are recompiled you need to restart the server. This can be triggered automatically when running it in "dev" mode:

$ npm run start:dev

This project was created as part of a master thesis by Christian Bromann on "Design and implementation of a Development and Test Automation Platform for HbbTV". The dissertation originated in cooperation with the Fraunhofer Institute for Open Communication Systems (FOKUS) and Louay Bassbouss.