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

qenya

v0.3.6

Published

a web application base on koa and react

Downloads

60

Readme

Qenya (昆雅)

Qenya是一个轻量数据管理,api输出的Mock Server。基于koa2、graphql、mongodb(tingodb)。

通常,前后端分离开发,前后端约定好接口后,分别各自开发,再一起联调。在后端接口还没有数据的时候,前端如何mock后端数据,就成了一个问题。

使用过很多种方案,比如用json文件,mock.js,faker等等,每种方案都不是特别的让人满意。个人希望的一个Mock Server应该具有以下的特点。

  1. 无污染。无论是html还是js源码,都可以做到开发和线上代码完全相同。
  2. 可以生成随机数据,数据可以持久化,可以做单元测试。
  3. 可以处理数据间的关联。
  4. 配置简单,很少的配置就可以开工。
  5. 可以在多人协同开发下使用。

所以就有了 Qenya 这个项目,通过以下几个方面来满足这些需求。

  1. 使用了 tingodb(超轻量文件数据库)或者 mongodb(可以多人协作开发)来持久化数据,可以比较完整的模拟CRUD的全部功能。
  2. 自动创建一个管理后台,通过图形化的方式来代替配置文件。
  3. 通过 graphql 来转换数据,处理数据关联等问题。

安装

首先安装nodejs,建议node 7.6 以上版本,创建一个目录,在命令行运行

$ npm install qenya --save-dev

使用

最小化配置只需要配置两个服务启动的端口号。会默认使用tingodb作为数据库,存放地址为项目启动目录下的data文件夹

const qenya = require('qenya')
qenya({
  appPort: 5000,
  apiPort: 5001
})

完整文档见这里