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

sohu-test-server

v0.1.4

Published

搜狐视频-前端测试服务(web)

Downloads

2

Readme

简介

一个简单的代理服务,使用nodejs编写,用于替代开发环境中使用的nginx.

使用理由:

  1. 专为团队定制,无需配置,指定自已工作目录即可。
  2. 请求、响应通过Http头禁用了缓存,保证调试代码都是新鲜的。
  3. 可探测源文件编码通过Http头指明字节流的编码,不会出现Html指明需要GBK,而JS源码保存为UTF-8而出现乱码问题。  
  4. 因JS编写一切自已所需定制功能都可以自已动手。

如何走起?

方法1:

npm install -g sohu-test-server
cd ~
mkdir -p sites/sohu
ln -s ${PRO1}/js    site/sohu/js
ln -s ${PRO1}/css   site/sohu/css
ln -s ${PRO1}/img   site/sohu/img
ln -s ${PRO1}/swf   site/sohu/swf
ln -s ${PRO2}       site/sohu/upload
sohutestd 

方法2:

1. node >= v0.8	(我的环境是0.8+ 低版没测过~~)
2. clone源码
3. 根据自已环境修改conf/default.js文件 (default.js)是根据我自已环境配滴
4. 进入目录内`node app.js`即可

自定义配置可用环境量:

{
  protocol: 'http:',
  slashes: true,
  host: 'tv.sohu.com',
  hostname: 'tv.sohu.com',
  href: 'http://tv.sohu.com/upload/swf/20130510/skins/s1.swf',
  pathname: '/upload/swf/20130510/skins/s1.swf',
  path: '/upload/swf/20130510/skins/s1.swf',
  rawurl: 'http://tv.sohu.com/upload/swf/20130510/skins/s1.swf' 
}

可用操作:

head(key, value)
exists(file)
detect(file)
rewrite(file, ctype)