davezuko/react-redux-starter-kit 创建 nodejs api 个端点。如何?

davezuko/react-redux-starter-kit create nodejs api endpoints. How to?

我刚刚开始探索来自 davezuko 的 reactjs-redux boilerplate 结构是分形的,我搜索了一种方法来实现 api 端点以从 mongodb.[=13 获取数据=]

有哪些方法?方法是创建一个新路由并以某种方式与 Koa 服务器交互?

阅读样板文档,作者似乎只包含 Koa 服务器以加载热模块中间件。

如果您想要为 mongodb 创建您自己的 API 端点,您可能想要创建您自己的端点以分离关注点。

来自文档:

Server

This starter kit comes packaged with an Koa server. It's important to note that the sole purpose of this server is to provide webpack-dev-middleware and webpack-hot-middleware for hot module replacement. Using a custom Koa app in place of webpack-dev-server makes it easier to extend the starter kit to include functionality such as API's, universal rendering, and more -- all without bloating the base boilerplate.