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

request-ok

v1.0.0

Published

## 简介

Downloads

6

Readme

request-ok

简介

request-ok是一个监测程序,旨在实现对站点加载中的每一个http请求及响应的状态 进行监控,并告知订阅者当前存在问题的站点及资源信息。

这里的不同之处在于使用了Headless Chrome。Headless Chrome在Chrome59中得到支持(之前得靠Chromium)。 它为命令行提供了Chromium所支持的所有现代web平台特性和Blink渲染引擎,这样一来就可以在命令行中“无Chrome”的操作Chrome了。(翻的…)

依赖

chrome dev tools: Chrome DevTools Protocol是应用、检查、调试和描述Chromium、Chrome等基于Blink的浏览器的协议。

chrome-remote-interface: chrome-remote-interface提供了一系列对Chrome DevTools Protocol封装的JavaScript API。

lighthouse:用其中的laucher来跨平台启动chrome

运行

$ npm i

设置需要监控的urls in config/pages.js

设置需要发送到的邮箱 in config/mail.js

设置header in config/headers.js

$ node index.js

布局

.
├── index.js      // 启动入口
├── modules/      // 封装模块
├── util/         // 工具函数
├── config/       // 配置文件

备注

  1. chrome-remote-interface的使用

  2. 暂时新加了models和app.js 请忽略。。。