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

iter-http

v1.0.13

Published

Run static file server

Downloads

35

Readme

基于nodejs的http服务器

基本功能

  1. 能开启web服务,加载各种web资源
  2. 能自动分配可用端口,也可以配置端口
  3. 能加载json文件并模拟网速
  4. 启动时能自动打开默认浏览器浏览,方便调试
  5. 支持常用文件的MIME类型
  6. 可配置主页
  7. 允许跨域请求,方便其它项目测试时调用模拟接口的JSON数据
  8. host默认为本地IP(方便生成二维码手机扫描预览)
  9. 支持304指定资源的缓存响应
  10. 支持对特定文件启用Gzip压缩
  11. 支持全局快捷命令调用
  12. 支持断点续传

安装

npm install iter-http -g

这里一定要安装到全局,才可以在任意目录下开启http服务 安装时也会自动安装依赖包 minimist 用于解析命令参数

显示帮助

iter-http --help
Usage:
  iter-http --help // print help information
  iter-http // random a port, current folder as root 随机一个可用端口,以当前目录为根目录
  iter-http 8888 // 8888 as port 指定一个端口
  iter-http -p 8989 // 8989 as port 指定一个端口
  iter-http -h index.htm // index.htm as home page 指定一个home页名称
  iter-http -d dist // dist as root 指定root根目录的名称