koa-cola
koa-cola is SSR(server side render)/SPA(singe page application) integrated solution framework with koa/react/react-router/redux/typescript, and using react stack(react component/react-router/react-redux) and "isomorphic" codes (used in both browser and server side).
Features
- built in SSR/SPA integrated solution
- "isomorphic" component/router/redux/ajax/validation in both client and server side
- typescript/es7 decorator coding style
Usage
koa-cola require latest version of koa.
Koa requires node v7.6.0 or higher for ES2015 and async function support.
koa-cola requires node v7.6.0 or higher as well. Node.js 8.0 comes with significantly improved performance of ES2017 async functions, so node.js 8.0 or higher is recommended.
npm i koa-cola -g
install global koa-colakoa-cola new koa-cola-app
create new koa-cola project in current foldercd koa-cola-app
npm run dev
start dev mode to build bundle and launch server.
Cola
decorator demonstrate the usage of "Universal" and how it work:
;;;;// universal ajax api called either in browser or node.js, in server side, ctx does exist.// use Cola decorator to "isomorphic" redux data flow
try demo in local:
git clone https://github.com/koa-cola/todolist
cd todolist
npm i
npm run local
visit koa-cola website for more detail