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

http-plug

v0.2.15

Published

Easy-to-use full platform static server,无依赖的迷你静态服务器,主要做html调试

Downloads

7

Readme

  • [x] 文件改动时html页面会实时刷新
  • [x] 非常迷你, 无依赖, 30KB不到
  • [x] 全局命令, 哪里需要点哪里
  • [x] 默认开启 SharedArrayBuffer
res.setHeader('Cross-Origin-Embedder-Policy', 'require-corp');
res.setHeader('Cross-Origin-Opener-Policy', 'same-origin');
  • [ ] 可设置账户登录
  • [ ] 搜索文件

介绍

    一开始我使用xammp里的web server做静态服务器,需求很简单,就是偶尔调试下html。首先我得先把文件拷贝到web server指定的目录下才能访问,虽然可以设置路径,但还是觉得麻烦。

    难道就没有一个可以非常便捷的在任意目录下创建静态服务器的工具吗?

    就像一个插头🔌, 插上马上就能用。

有啊,light-server 😒2020-08-08

    接着我本着尽可能简单的原则,只使用node自带模块来开发这个工具

安装

01.模块安装

02.单文件运行

03.桌面客户端

01.模块安装

全局安装(🚀推荐)

全局环境下安装 plug 命令,安装完成之后,我们就可以在任何地方执行 plug 命令了

npm i http-plug -g

我的实际输入(macOS):sudo cnpm i http-plug -g

进入任意文件夹下输入

cd <任意文件夹>
plug

即可在这个文件夹下创建http-plug

使用 -h -H -help 获取更多使用帮助

plug -h

可用的命令

plug                    打开http-plug(默认端口9527)
plug 8888               使用8888端口打开(失败后则重新随机分配可用端口)
plug -l | -L            打印日志 
plug 8888 -l | -L       指定端口并打印日志 
plug -v | -V            查看版本
plug -h | -H            帮助

局部安装

进入项目文件夹输入

npm i http-plug --save-dev

接着使用node自带的 npx 启动,获取帮助信息可输入 npx http-plug -v

npx http-plug

02.单文件运行

得益于只使用node原生模块,提供了更多的灵活性

下载主文件http-plug. js文件,放置项目根目录,接着cd这个项目输入下面即可

node http-plug.js

03.桌面客户端

使用pkg生成。 软件所在的根目录即为服务器的根目录。

pkg把整个node都打包了,虽然是用了8.0版本的node,但还是很大😒。

下载 windows7/10(21.8 MB)

下载 macOS(33.7 MB)

下载 linux(32.7 MB))

使用

界面说明

命令行

安全性

http-plug本意是用来开发时调试使用,避免用在生产环境。

end