1.0.46 • Published 4 months ago
chanjs v1.0.46
Chanjs
Chanjs 是一个基于 Express 构建的轻量级 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 处理
- 日志功能
运行
const Chanjs = require("chanjs");
const chan = new Chanjs();
// 加载中间件
chan.beforeStart(fn);
// 扫描模块
chan.start();
// 启动服务器
chan.run();
该框架专为寻求简单与功能之间平衡的开发者设计,为构建 Web 应用程序提供了一个强大的基础。
1.0.46
4 months ago
1.0.45
4 months ago
1.0.44
4 months ago
1.0.43
5 months ago
1.0.42
5 months ago
1.0.39
5 months ago
1.0.38
5 months ago
1.0.40
5 months ago
1.0.41
5 months ago
1.0.37
5 months ago
1.0.36
7 months ago
1.0.33
7 months ago
1.0.31
7 months ago
1.0.35
7 months ago
1.0.30
7 months ago
1.0.29
7 months ago
1.0.28
8 months ago
1.0.27
8 months ago
1.0.26
8 months ago
1.0.25
8 months ago
1.0.22
10 months ago
1.0.21
10 months ago
1.0.24
10 months ago
1.0.23
10 months ago
1.0.18
10 months ago
1.0.17
10 months ago
1.0.20
10 months ago
1.0.16
10 months ago
1.0.15
10 months ago
1.0.14
10 months ago
1.0.13
11 months ago
1.0.12
11 months ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.9
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.2
1 year ago
1.0.3
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
0.0.1
1 year ago