Skip to content

syuukawa/vnt-explorer-front

Repository files navigation

VNT Explorer 前端运行指南

下载代码

git clone https://github.com/vntchain/vnt-explorer-front.git

安装 npm

安装依赖

npm install

配置环境变量

  • ./env 文件

    REACT_APP_API_DEV=#开发环境后端地址
    REACT_APP_API_PROD=#生产环境后端地址
    
  • ./constants/config.js

    export const rpc = // VNT 网络节点的 rpc 地址
    export const chainId = // VNT 网络的 chain ID

运行

npm start

部署

步骤:

  • 项目地址更新最新代码
git pull
  • 编译代码,并去除js map文件
npm run build
rm build/static/js/*.map
  • 复制build内容到部署地址
cp -r <origin path> <target path>
  • 重启nginx
nginx -s reload