next.js + koa2 + TypeScript,需Node6以上环境。
具有以下功能:
- 基于Next.js的同构视图渲染框架
- 基于koa2的server服务,可自定义路由,编写Restful Api,默认支持CORS跨域
- 可选择koa2作为Next.js的server,也可单独运行Next.js服务,或者单独运行基于koa2的api服务
- 支持TypeScript模板
npm i
npm run-script dev
npm run-script build
npm run-script start
npm run-script dev_next
npm run-script start_next
npm run-script dev_api
PORT=9000 npm run dev