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 🙏

© 2026 – Pkg Stats / Ryan Hefner

ice-midway-react-scaffold

v1.0.4

Published

基于 Iceworks 能够一键生成 ice 和 Node 的前后端分离的项目;前端使用 React 技术栈,后端使用 midway 作为服务端开发框架。

Readme

简介

基于 Iceworks 能够一键生成 ice 和 Node 的前后端分离的项目;前端使用 React 技术栈,后端使用 midway 作为服务端开发框架。

Midway

本地开发

$ npm i
$ npm run dev
$ open http://localhost:7001/

部署

$ npm start
$ npm stop

测试

  • [midway-bin] 内置了 [mocha], [thunk-mocha], [power-assert], [istanbul] 等框架,让你可以专注于写单元测试,无需理会配套工具。
  • 断言库非常推荐使用 [power-assert]。
  • 具体参见 midway 文档 - 应用测试

内置指令

  • 使用 npm run lint 来做代码风格检查。
  • 使用 npm test 来执行单元测试。
  • 使用 npm run autod 来自动检测依赖更新,详细参见 autod

如需进一步了解,参见 midway 文档

整体目录结构

.
├── README.md
├── README.zh-CN.md
├── README.md                           ---- 项目说明
├── .gitignore                          ---- git 忽略目录配置
├── .editorconfig                       ---- 代码风格配置
├── .eslintignore                       ---- eslint 忽略目录配置
├── .eslintrc                           ---- eslint 配置
├── .webpackrc.js                       ---- 自定义 webpack 配置
├── package.json                        ---- package.json
├── dist                                ---- 编译后后端代码目录
│
│   // 客户端代码
├── assets
│   ├── components                      ---- 公共组件
│   ├── layouts                         ---- 通用布局
│   ├── pages                           ---- 页面
│   ├── menuConfig.js                   ---- 导航配置
│   ├── routerConfig.js                 ---- 路由配置
│   ├── router.js                       ---- 路由入口
│   ├── index.html
│   ├── favicon.png
│   └── index.js                        ---- 入口文件
│
│   // 服务端代码
├── src                                 ---- 源码目录
│   ├── app                             ---- web 层目录
│   │   ├── controller                  ---- web 层 controller 目录
│   │   │   ├── home.ts
│   │   │   └── user.ts
│   │   ├── middleware (可选)            ---- web 层中间件目录
│   │   │   └── trace.ts
│   │   ├── public (可选)                ---- web 层静态文件目录,可以配置
│   │   ├── view (可选)
│   │   |   └── home.tpl                ---- web 层模板
│   ├── config
│   │   ├── config.default.ts
│   │   ├── config.local.ts
│   │   ├── config.prod.ts
│   │   ├── config.unittest.ts
│   │   └── plugin.ts
│   └── lib                             ---- 业务逻辑层目录
│   │   ├── interface.ts                ---- 接口定义文件
│   │   └── service                     ---- 业务逻辑层,目录根据业务自己定义
│   │       └── user.ts   
│   ├── app.ts                          ---- 应用扩展文件,可选
│   └── agent.ts                        ---- agent 扩展文件,可选
├── test
│   └── app
│       └── controller
│           └── home.test.ts
├── logs                                ---- 本地日志目录
│   └── midway6-test                    ---- 日志应用名开头
│       ├── common-error.log            ---- 错误日志
│       ├── midway-agent.log            ---- agent 输出的日志
│       ├── midway-core.log             ---- 框架输出的日志
│       ├── midway-web.log              ---- koa 输出的日志
│       └── midway6-test-web.log
├── tsconfig.json
└── tslint.json