是否有任何人可以为构建这样的应用程序提供任何好的示例或指导?
Client (client.company.com)
Node.js
Angular
Jade
ExpressJS
Server (private) (server.company.com)
node.js
"rest" api (express)
该 api 现在是私有的,只能从托管服务器访问。
例如,如果有一个创建食谱的页面,这是对的吗?客户
- angular form with router that posts to client.company.com/recipe
- express would need route to handle that /recipe
- that route would then post to api server server.company.com/recipe
- then response would be propagated through the layers back to the ui.
让客户端复制 api 路由是正确的吗?有什么可以做的来简化和减少重复的事情吗?