针对中后台CRUD业务的种子工程,api使用nodejs搭配ORM框架,前端技术栈为dva+andt+roadhog。
- antd - UI framework
- dva - data management
- bookshelf - ORM
- knex - query string builder
- Express - fast node.js network app framework
Install dependencies.
$ npm install
global install knex
$ npm install knex -g
generate and populate the database
$ knex migrate:latest && knex seed:run
Start project and happy hacking 🍺
$ npm run dev
当前项目有三个布局放在一起,实际开发的时候要去掉其他两个。关于路由的使用方法请参考react-router
route/index.js
<Switch>
<Route exact path="/"
render={props => {
return (
<Redirect
to={{
pathname: '/nav1',
state: { from: props.location },
}}
/>
)
}}
/>
<AuthRoute path="/nav1" component={Nav1} />
<AuthRoute path="/nav2" component={Nav2} />
<AuthRoute path="/nav3" component={Nav3} />
<Route component={NoMatch} />
</Switch>
- install sqlite@3.1.11 in CentOS6 will give error
GLIBC_2.14 not found
install sqlite3@3.1.10 instead - 开发环境会出现页面闪烁
- Tests and coverage report
- jwt Auth
- TypeScript
- mongoose
- strip out dva&roadhog
MIT