简体   繁体   English

如何在我自己的服务器或域上部署 React App?

[英]How to Deploy React App on my own Server Or Domain?

I made a React App and It works fine on my local server and I was trying to Deploying App on my Domain but it doesn't work at all.我制作了一个 React 应用程序,它在我的本地服务器上运行良好,我试图在我的域上部署应用程序,但它根本不起作用。 Its good to know that I have server that connected to my domain and my react app is working fine on my server too but not showing anything in my domain.很高兴知道我有连接到我的域的服务器,并且我的 react 应用程序在我的服务器上也可以正常工作,但在我的域中没有显示任何内容。 不要担心警告

and this is my dependencies "dependencies": { "@apollo/client": "^3.1.3", "apollo-graphql": "^0.5.0", "apollo-server-express": "^1.3.6", "bcrypt": "^5.0.0", "body-parser": "^1.18.3", "concurrently": "^3.5.1", "cors": "^2.8.4", "dotenv": "^5.0.1", "express": "^4.17.1", "graphql": "^0.13.2", "graphql-tools": "^3.0.2", "graphql-type-long": "^0.1.1", "jsonwebtoken": "^8.2.1", "mongodb-core": "^3.2.7", "mongoose": "^5.1.3", "react-images-upload": "^1.2.8", "react-persian": "^1.1.1", "react-router-dom": "^5.2.0" },这是我的依赖"dependencies": { "@apollo/client": "^3.1.3", "apollo-graphql": "^0.5.0", "apollo-server-express": "^1.3.6", "bcrypt": "^5.0.0", "body-parser": "^1.18.3", "concurrently": "^3.5.1", "cors": "^2.8.4", "dotenv": "^5.0.1", "express": "^4.17.1", "graphql": "^0.13.2", "graphql-tools": "^3.0.2", "graphql-type-long": "^0.1.1", "jsonwebtoken": "^8.2.1", "mongodb-core": "^3.2.7", "mongoose": "^5.1.3", "react-images-upload": "^1.2.8", "react-persian": "^1.1.1", "react-router-dom": "^5.2.0" },

one more thing I am using Transmit to upload file in my server and my react app is on react-recipes file我正在使用 Transmit 将文件上传到服务器中的另一件事,而我的 react 应用程序位于 react-recipes 文件中发送

// edit I build the application and there is Build folder where should I upload it and What should I do???? // 编辑我构建了应用程序,并且有 Build 文件夹,我应该在哪里上传它,我应该做什么????

ok,I build the app and instead of using server,try use cPanel and it work fine,just upload all fiels that are inside build folder and you are good to go好的,我构建了应用程序,而不是使用服务器,尝试使用 cPanel 并且它工作正常,只需上传构建文件夹中的所有文件,你对 go 很好

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM