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

mingyang_http

v2024.2.4

Published

simplified and efficient httpServer component

Downloads

61

Readme

introduction

  • 精简高效的httpServer组件,体积小巧,运行高效,代码简单,支持multipart/form-data格式,支持通配路由,支持路由变量,能完美运行在 (aliyun FC / tencent SCF) 中,使用最小内存选项即可。
  • simplified and efficient httpServer component, small size, efficient operation, simple code, support multipart/form-data format, support wildcard routing, support routing variables, works perfectly in (aliyun function compute) and (tencent cloud serverless cloud function), minimum memory can be used.

environment

  • 1 General Node(nodejs)
  • 2 Aliyun FC (aliyun function compute)
  • 3 Tenyun SCF (tencent cloud SCF Node)

run

  • 1 NodeJS(on os)

run “sample_bin.js directly(need to set environment variable develoment=true or delete related code in sample_bin.js)

  • 2 Aliyun FC (aliyun function compute)

setup:function>setting>functing entry to “sample_bin.requestForAliyun”(its default value generally is index.handler)

  • 3 Tenyun SCF (tencent cloud SCF Node)

setup:function>setting>functing entry to “sample_bin.requestForTenyun default value generally is index.main_handler)


test

  • 查看original message和匹配的router,router-variable
  • View original message and matching router,router-variable http://localhost:9090/root/path?key0=value0&key1=value1
  • 返回1234的62进制形式
  • Returns 1234 in base 62 http://localhost:9090/base62/1234
  • 返回从【2023-01-01到现在】的时间戳的62进制形式
  • Returns the base 62 form of the timestamp from [2023-01-01 to present] http://localhost:9090/base62/2023/
  • 返回10个time开头的有字母ID(有分段符)
  • Returns 10 alphabetic IDs starting with time (with segment characters) http://localhost:9090/timeid/10
  • 返回20个time开头的有字母ID(无分段符)
  • Returns 20 alphabetic IDs starting with time (no segment characters) http://localhost:9090/timeID/20
  • 返回30个time开头的全数字ID(有分段符)
  • Returns 30 numeric IDs starting with times (with segment characters) http://localhost:9090/timeno/30
  • 返回40个time开头的全数字ID(无分段符)
  • Returns 40 numeric IDs starting with times (no segment characters) http://localhost:9090/timeNO/40
  • 其它路由
  • other router http://localhost:9090/insert/abcd?key=value
  • 其它路由
  • other router http://localhost:9090/select/abcd?key=value

history

  • 2023-08-26
  • 去掉了post和put时候 强制要求content-length大于0的要求
  • removed the requirement that content-length be greater than 0 when post and put are mandatory
  • 未配置 允许的content-type 的情况下,那么允许所有的
  • if the allowed content-type is not configured, all are allowed
  • 优化一些http状态码的提示语
  • optimized some http status code prompts
  • 增加了示例代码 sample_bin:入口文件; sample_router:路由文件
  • added sample file sample_bin:entry file; sample_router:router file
  • 2023-10-13
  • 去掉了对mingyang_data包的依赖
  • removed the dependency on the mingyang_data package
  • request在任何情况下都有字段routerVariable
  • in any case there is a field routerVariable
  • 2024-01-17
  • 适配了腾讯云SCF
  • adapted to tencent cloud serverless cloud function
  • 2024-02-04
  • 优化了body中的代码
  • optimized the code in the body
  • 优化了示例代码
  • optimized the sample code (sample_bin.js and sample_router.js)

author

  • fujun wang([email protected]
  • Wangjing Beijing China
  • origin of the name : mingyang is my son's name
  • last modified : 2024-02-04