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

chanjs

v1.1.2

Published

chanjs基于express5 纯js研发的轻量级mvc框架。

Downloads

279

Readme

Chanjs

Chanjs 是一个基于 Express5+ 构建的轻量级 MVC 框架,完全使用 JavaScript 开发。它体现了函数式编程的概念,提供了卓越的性能、清晰的代码和易于遵循的过程,确保了高可维护性。

特点

  • 基于 Express 构建
  • 支持 ES6 语法
  • 模块化设计
    • 多模块化路由
    • 模块化 views
    • 模块化 controllers
    • 模块化 services
  • 插件式架构
  • 轻量级(核心代码在300行以内)
  • 缓存支持

约定优于配置

|- app
    |- config 
    |- module 
        |- module1 
            |- controller 
            |- service 
            |- view 
            |- router.js 
        |- module2 
            |- controller 
            |- service 
            |- view 
            |- router.js
    |- extend 
    |- middleware 
    |- plugin 
        |- plus-module1 
            |- controller 
            |- service 
            |- view 
            |- router.js 
        |- module2 
            |- controller 
            |- service 
            |- view 
            |- router.js
    |- public 
|- index.js

初始化过程

  • 初始化
  • 加载配置
  • 加载模块
    • 加载服务
    • 加载控制器
    • 加载路由
  • 加载扩展
  • 加载插件
    • 加载服务
    • 加载控制器
    • 加载路由
  • beforeStart() 钩子用于将数据库中的配置合并到配置中
  • run() 启动服务器

官方网站

使用 Chanjs 开发的 CMS 系统
网站:https://www.chancms.top

功能亮点

  • 配置文件
  • 多模块 MVC 结构
  • 插件 MVC 支持
  • CORS 跨域配置支持
  • 多数据库支持 (PostgreSQL、MySQL / MariaDB、SQLite3、Oracle Database、MSSQL)
  • 路由控制
  • Art-template 模板引擎
  • 静态资源管理
  • Cookie 处理
  • 日志功能

运行

import Chanjs from "chanjs";
const chan = new Chanjs();
// 前置钩子
chan.beforeStart(fn);
// 开始加载
await chan.start();
chan.run((port) => {
  console.log(`ChanCMS is running on ${port}`);
});

该框架专为寻求简单与功能之间平衡的开发者设计,为构建 Web 应用程序提供了一个强大的基础。