如何在反应中运行现有项目

时间:2022-09-21 01:11:47

I am new in react, and now I have an available project which is needed some kind of development. The whole project consists of app and build folder and both of them also have index.html file and some other staff. How can I launch this project for viewing its demo in linux?could anyone explain the process step by step?

我是新的反应,现在我有一个可用的项目需要某种开发。整个项目由app和build文件夹组成,它们都有index.html文件和其他一些工作人员。如何启动此项目以在linux中查看其演示?是否可以逐步解释该过程?

thanks in advance

提前致谢

1 个解决方案

#1


0  

Approach 1: Via Node

方法1:通过节点

  1. Install Node Install Node on linux machine

    在linux机器上安装节点安装节点

  2. Once successfully installed, go to project folder and run npm install to install dependencies.

    成功安装后,转到项目文件夹并运行npm install以安装依赖项。

  3. Run command "npm start" or in background "nohup npm start &" will start default application on 3000 port, from browser check http://IP/domain name:3000

    运行命令“npm start”或在后台“nohup npm start&”将启动3000端口上的默认应用程序,从浏览器检查http:// IP /域名:3000

Approach 2 Via Yarn

方法2通过纱线

  1. Install Yarn on linux machine Install Yarn

    在linux机器上安装Yarn安装Yarn

  2. from project folder run yarn install will install all dependencies.

    从项目文件夹运行纱线安装将安装所有依赖项。

  3. run yarn build will create complied code in /build folder

    run yarn build将在/ build文件夹中创建编译代码

  4. Install apache or Ngnix and move build folder content to apache or ngnix web root folder

    安装apache或Ngnix并将构建文件夹内容移动到apache或ngnix web根文件夹

  5. Access app from http://IP or domain name if seted up for ip.

    如果为ip设置,则从http:// IP或域名访问应用程序。

#1


0  

Approach 1: Via Node

方法1:通过节点

  1. Install Node Install Node on linux machine

    在linux机器上安装节点安装节点

  2. Once successfully installed, go to project folder and run npm install to install dependencies.

    成功安装后,转到项目文件夹并运行npm install以安装依赖项。

  3. Run command "npm start" or in background "nohup npm start &" will start default application on 3000 port, from browser check http://IP/domain name:3000

    运行命令“npm start”或在后台“nohup npm start&”将启动3000端口上的默认应用程序,从浏览器检查http:// IP /域名:3000

Approach 2 Via Yarn

方法2通过纱线

  1. Install Yarn on linux machine Install Yarn

    在linux机器上安装Yarn安装Yarn

  2. from project folder run yarn install will install all dependencies.

    从项目文件夹运行纱线安装将安装所有依赖项。

  3. run yarn build will create complied code in /build folder

    run yarn build将在/ build文件夹中创建编译代码

  4. Install apache or Ngnix and move build folder content to apache or ngnix web root folder

    安装apache或Ngnix并将构建文件夹内容移动到apache或ngnix web根文件夹

  5. Access app from http://IP or domain name if seted up for ip.

    如果为ip设置,则从http:// IP或域名访问应用程序。