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 🙏

© 2026 – Pkg Stats / Ryan Hefner

quick-local-service

v1.0.2

Published

quick start local static service for web front end dev

Readme

quick-local-service

快速启动静态web服务命令行程序

Build Status

当你编码了一个页面 index.html\other.html, 可以通过quick-local-service为这个页面启动web服务,以便在浏览器中通过 http://127.0.0.1:10086/index.html 来访问页面 (默认index.html)。 这样可以避免遇到直接双击打开页面时可能出现的跨域问题。

安装和使用

安装

$ npm install quick-local-service -g

进入项目目录,并启动服务

$ cd demo
$ qls run

默认端口: 10086

可以通过命令参数 -p 8989 设定端口.

另外,还可以使用命令参数 -d demo来指定项目路径.

$ cd demo
$ cd ..
$ qls run -d demo

配置文件

init 指令可以帮助在当前目录生成配置文件qls.config.js,这样run的时候会以配置文件为主,不再需要使用参数。

qls.config.js.

module.exports = {
	port:10086,
	dir:""
}

init会设置dir为当前目录路径。

另外,还可以通过参数指定配置文件 '-c other.config.js'

$ qls run -c other.config.js

配置跨域接口代理

在配置文件内 qls.config.js,定义proxy字段,例如:

module.exports = {
	port: 10086,
	dir: '',
	proxy:{
		'/api':{
			host:'http://127.0.0.1:8910',
			pathRewrite:{
				'^/api': '/api'
			}
		}
	}
}

在本项目的example目录有示例. (html/proxy.html [qls run], service/other-proxy.js [node other-proxy.js])

Todo:

  1. 配置模拟接口
  2. [完成] 代理跨域接口
  3. [完成] 识别端口被占用的情况