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

liteserver

v0.3.0

Published

Downloads

113

Readme

liteserver

liteserver 是一个轻量级的http服务器

## 使用方法

var LiteServer = require('liteserver'); var serv = LiteServer.create(cfg); // cfg 参考config配置一节 var controller = serv.loadController(path); // 加载控制器 serv.router({ '/index' : controller.index, '/favicon' : serv.favicon(icopath) }).view({ base:tplpath, // 模板的路径, 模板引擎目前只支持 liteview,后续加入其他模板引擎的接入 debug:debug, // true or false }).start(function(err){ if(err){ console.log(err); }else{ console.log('server start!'); } });

config 配置

{ root: string 服务所在的路径 ,加载控制器、模板等等,都依赖此路径 port: string 服务端口,目前只支持单个端口的绑定。多端口暂不考虑 errlog: path 错误日志保存地址,不提供将绑定到process.stderr infolog: path 一般日志保存地址,不提供将默认和errlog同文件,如果errlog也是空,则绑定到process.stdout loglevel: object {debug:bool,trace:bool,info:bool,warn:bool,error:bool} 日志记录开关,可设定哪些日志输出,总共5个级别 tpl: path 模板存放地址,相对于root的地址,注意path最前面不为"/"开头 debug: bool 是否调试状态 }