[英]Deploying a react app that uses a JSON-server as backend,
I recently started using Heroku for my deployments.我最近开始使用 Heroku 进行部署。 So far I only used it to deploy front-end react apps which were fairly straight forward.
到目前为止,我只用它来部署相当简单的前端 React 应用程序。 But now I am trying to deploy a full-stack react app that uses a JSON-server as the backend.
但现在我正在尝试部署一个使用 JSON 服务器作为后端的全栈反应应用程序。 During the development process, I used concurrently to run the JSON server and the react app at the same time.
开发过程中,我使用concurrently同时运行JSON服务器和react app。 I am not really sure how to create a static build for it and deploy it on Heroku as a single instance since the JSON server and react-app are two separate processes.
我不太确定如何为其创建 static 构建并将其作为单个实例部署在 Heroku 上,因为 JSON 服务器和 react-app 是两个独立的进程。 Any help here will be highly appreciated.
这里的任何帮助将不胜感激。 Thank you.
谢谢你。
Github link to the project - https://github.com/Syndicate555/IT-Logger Github 项目链接 - https://github.com/Syndicate555/IT-Logger
I saw that you are using CRA in building your app, you have two options我看到您正在使用 CRA 构建您的应用程序,您有两种选择
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.