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 🙏

© 2025 – Pkg Stats / Ryan Hefner

fcpipe

v0.1.5

Published

building a pipe between front to back ends

Readme

fcpipe 使用说明

安装方法

  • npm 安装

    npm install fcpipe -g

  • github获取安装

    npm install git://github.com/linkwisdom/fcpipe.git -g

  • 更新版本

    npm update fcpipe -g

使用方法

  • 绑定客户端host (ip, domain) 为了防止cookie等权限因素; 浏览器端必须绑定host到pipe服务器, 绑定方式可以改host文件,也可以使用proxy插件;或者自定义PAC文件(建议方式)

  • 访问不同的host会将请求转发到不同的机器; 如果fctest和fc-offline要重新绑定参考后面的router配置

    127.0.0.1 fc-offline.baidu.com

    127.0.0.1 fctest.baidu.com

    127.0.0.1 mock-host

  • 启动代理服务器, 默认8000端口

    fcpipe [port]

原理

  • 前向代理,按url解析将静态资源重定向到前端开发的edp服务器;权限验证和ajax服务重定向到BFE支持的fctest或fc-offline机器

自定义配置

  • 如果默认配置无法满足需求,建议创建自定义配置文件
  • 在当前启动目录或父级目录下建立fcpipe-config.js文件, 配置如下程序
  • 各个配置项目如果没有配置会用默认配置替代
  • 增加了请求劫持,自定义返回内容;
  • 增加了自定义返回内容
exports.port = 8000;
exports.router = {
    "static-host": "127.0.0.1",
    "fctest.baidu.com": "10.94.23.61",
    "fc-offline.baidu.com": "10.48.236.52",
    "fengchao.baidu.com": "10.81.35.167"
};

exports.proxyList = [
    {
        "path": /\/nirvana\/asset\/aoPackage.*\.js/g,
        "replace": ["/nirvana/asset", "/nirvana-workspace/nirvana/src"],
        "nostamp": true,
        "host": "static-host",
        "port": 8848
    },
    {
        "path": "/",
        "host": "dynamic-host",
        "port": 8000
    }
];