2.3.0 • Published 7 years ago

sp-base v2.3.0

Weekly downloads
6
License
Apache-2.0
Repository
github
Last release
7 years ago

sp-base Superproject core

Superproject 是基于 React + Koa 全栈技术框架。 sp-base 是实现Superproject的基础代码,提供了启动程序和可扩展接口。

扩展点

Client 可以扩展

redux middleware

redux reducer

react router

Server 可以扩展

koa middleware

koa router

// 新的使用use和mount,充分利用koa的中间件机制

接口使用

Client

import { redux, router, createConfigureStore, run } from 'superproject/client'

client.redux.use() // redux中间件
client.redux.reducer.use() // redux的reducer挂载
client.router.use() // react-router挂载
client.run() // 运行客户端

Server

import { middleware, router, commonMiddlewares, run } from 'superproject/server'

server.middleware.use() // koa-middleware中间件
server.router.use() // koa-router挂载
server.run() // 运行服务端

相关扩展(无链接表示未完成)

例子说明
sp-boilerplateSuperproject 项目示例
核心基础说明
sp-baseSuperproject基础代码
工具说明
sp-css-loader处理组件化样式的webpack loader,可与file-loader配合使用
服务端中间件(Koa)说明
sp-react-isomorphicReact(Redux)同构Koa中间件
模块说明
sp-css-import辅助sp-css-loader加载样式
sp-email发邮件
sp-sms发短信
sp-mongomongodb 操作对象
sp-qiniu七牛存储操作
功能说明
sp-wx微信相关功能
sp-cmscms模块功能
sp-apiapi接口生成
sp-schedule时间表、计划任务
sp-auth权限管理+登录

技术栈(计划使用)

组件化 - React 状态管理 - Redux 路由 - React-Router 同构 - React RenderToString Style导入 - wapper-css-loader 打包工具 - webpack2 组件库 - Material-UI CSS编译 - Less \ CSS ES6\7编译 - Babel

单元测试 - Mocha

HTTP服务 - Koa2 静态服务器 - 七牛云 缓存服务 - Redis 数据库 - MongoDB

NodeJS进程管理 - PM2 HTTP反向代理 - Nginx

环境容器 - Docker

代码管理 - Git 持续集成 - Jenkins

约定

Server API Response

{
    "code": 200, // 类似 HTTP Status Code
    "data": [], // or {}
    "msg": "返回提示语"
}
2.3.0

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.5.0

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago