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

fcserver

v0.1.1

Published

node版精简服务器

Readme

fcserver

安装

npm install -g fcserver

使用

  • 启动方法,在项目根目录下
fcserver start [-o] [-p 8000]   // -o 表示同时打开默认浏览器 -p 指定端口
fcserver-master  // 通过守护进程启动,跌机时会自动重启  但是只能使用默认的8080端口

功能

  • 支持文件目录索引
  • 支持less文件使用
  • 支持本地mock数据
  • 支持es6文件自动转换成es5(要求预先全局安装babel模块)
  • 支持自定义处理器
  • 按分钟记录请求日志到log文件下
  • 正在扩展各种资源的处理器...

已经拥有的处理器模块

  • less 处理less文件,直接将less语法的文件转换成css格式后返回到客户端
  • mock 本地请求的mock数据,可以动态生成一些列数据供客户端使用,使得前端开发不再依赖后端接口
  • es6to5 将es6语法的文件直接动态转成es5,然后返回给客户端

关于使用本地mock数据服务的说明

在项目根目录下添加fcserver-config.js配置文件,文件内容如下

exports.path2Handler = [
    { 
        // 对less文件的请求,交由less处理器模块
        path: /.+\.less($|\?)/, // path配置特定的路径
        handler:  'less' // handler是该路径下请求对应的处理器模块名称
           
    },
    {   
        // 对以.ajax标示的异步请求,交由mock处理器模块
        path: /.+\.ajax($|\?)/,
        handler: 'mock'
    },
    {
        path: /._es6\.js?($|\?)/, // 为了标示es6文件,所有es6类型文件都以*_es6.js结尾
        handler: 'es6to5'
    },
    {
        path: /._es6\.js?($|\?)/, // 为了标示es6文件,所有es6类型文件都以*_es6.js结尾
        handler: addCookie  // 自定义处理器以函数名表示,该函数要求在配置文件中可以访问
    }
];

// mockPath是mock文件的顶级文件夹,默认是项目根目录下的mock文件夹,你也可以配置成其他目录作为mock顶级目录,例如,当ajax的请求url为/path/to/file时,前端会返回如下路径里的文件返回值
   root
        ----mock
            ----path
                ----to
                    ----file.js
exports.mockPath = './mock';