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

koacrab

v1.1.5

Published

> 前身是hzl.php(未开源), 后基于express重构后,随着koa2的出现,使用到了async/await,不再需要经过Babel,就能很好的解决了回调的问题,所以使用Koa2进行改版升级,并于老婆的生日那天开源。

Downloads

10

Readme

KoaCrab

前身是hzl.php(未开源), 后基于express重构后,随着koa2的出现,使用到了async/await,不再需要经过Babel,就能很好的解决了回调的问题,所以使用Koa2进行改版升级,并于老婆的生日那天开源。

含义:因为是基于koa的,所以也蹭下koa的热度,再者主要是Crab,对,没错,就是螃蟹!

简单易上手!

核心功能

  • 支持koa、koa2、express的中间件
  • 支持es6/es7/es8/es9/es10等特性开发
  • 单元测试
  • 支持websocket
  • 覆盖率
  • 日志
  • 多域名、多项目、多模块
  • 模板渲染
  • 安全
  • 国际化
  • 异常处理
  • cookie和session
  • 数据库orm
  • 命令行
  • 支持pm2
  • Docker部署
  • 插件
  • 钩子Hook
  • 代理Proxy
  • 集群

系统原理

API

  • 在控制器可以使用this.services调用services下的方法
  • 在services中可以使用koacrab.models调用models下的方法
  • this.request.fields 获取post数据
  • this.request.query 获取get数据
  • koacrab.conf可以获取配置的数据

工具

  • KoaCrab-Cli脚手架工具
  • KoaCrab-Mock 模拟数据
  • KoaCrab-Api API接口管理
  • KoaCrab-Cron 计划任务
  • 性能测试

案例(等待开源)

  • KoaCrab-Demo 学习案例
  • KoaCrab-Hzl 海之林官网
  • KoaCrab-Auth 多系统登录
  • KoaCrab-CMS cms管理系统
  • KoaCrab-Blog Blog管理系统
  • KoaCrab-Shop 商城
  • KoaCrab-Weixin 微信公众号管理
  • KoaCrab-wx 微信小程序
  • KoaCrab-Admin 后台管理生成
  • KoaCrab-Pm2 pm2管理系统
  • KoaCrab-Doc 文档管理系统
  • KoaCrab-Tools 工具
  • KoaCrab-Monitor 前端监控管理系统
  • KoaCrab-Teamwork 协同云
  • KoaCrab-Monitor 埋点监控

bug

  • 根目录的文件夹,models,services,controllers不存在时会报错
  • 中间件的顺序不同,执行的也不同,例如mysql放到view后面,Mysql里面的方法就获取不到了,异步中间件
  • 配置文件,同时支持多个数据库
  • 端口被占用时就使用另一个端口
  • 不同的环境要取不同的配置

参考