Skip to content

NewEconoLab/NEL_Scan-Web-React

Repository files navigation

NELBrowser

简体中文 | English

概述 :

本项目是 NEL浏览器 用于NEO区块链上的数据查询功能,包括交易信息,资产信息,NNS域名信息的搜索和显示。

部署

安装nginx(如果已经安装则跳过) :

yum install nginx -y

安装git(如果已经安装则跳过) :

yum install git -y

通过git将本工程下载到服务器 :

git clone https://github.com/NewEconoLab/NELBrowser-Web-React.git

配置

配置nginx

server{
                listen 443 ssl;
                server_name ***;

                root ~/NELBrowser-Web-React/build;

                ssl_certificate ***.pem;
                ssl_certificate_key ***.key;

                location /
                {
                        try_files $uri /index.html;
                }
                location /test
                {
                        try_files $uri /test/index.html;
                }
        }

启动

重启nginx

nginx -s reload

后端服务依赖

https://api.nel.group/api/ // 公用api
https://apiscan.nel.group/api/ // 浏览器api

开发者调试

  • 启动(测试网)
npm install / yarn add
npm start / yarn start
  • 启动(主网)
npm run startpub
  • 打包发布
npm run build
  • 如需要更替自己的后端服务请至 api请求配置文件进行修改,修改后执行打包命令
const network: string = process.env.REACT_APP_SERVER_ENV === 'DEV' ? 'testnet' : 'mainnet'; // 主网/测试网
const baseCommonUrl: string = "https://api.nel.group/api/" + network; // 公用api服务
const baseUrl: string = "https://apiscan.nel.group/api/" + network;   // 浏览器api服务

技术选型

  1. React
  2. React-router
  3. Mobx
  4. Typescript

代码约束

遵循 typescript-react 规范 以及 arbnb 规范

Overview:

This project is [NEL Browser] (https://scan.nel.group/) used for data query function on NEO blockchain, including transaction information, asset information, NNS domain name information search and display.

Deployment

Install nginx (skip if installed):

Yum install nginx -y

Install git (skip if installed):

Yum install git -y

Download the project to the server via git:

Git clone https://github.com/NewEconoLab/NELBrowser-Web-React.git

Configuration

Configuring nginx

Server{
                Listen 443 ssl;
                Server_name ***;

                Root ~/NELBrowser-Web-React/build;

                Ssl_certificate ***.pem;
                Ssl_certificate_key ***.key;

                Location /
                {
                        Try_files $uri /index.html;
                }
                Location /test
                {
                        Try_files $uri /test/index.html;
                }
        }

start up

Restart nginx

Nginx -s reload

Backend service dependencies

Https://api.nel.group/api/ // public api
Https://apiscan.nel.group/api/ // browser api

Developer debugging

  • Start (test network)
Npm install / yarn add
Npm start / yarn start
  • Start (main network)
Npm run startpub
  • Package release
Npm run build
Const network: string = process.env.REACT_APP_SERVER_ENV === 'DEV' ? 'testnet' : 'mainnet'; // main network/test network
Const baseCommonUrl: string = "https://api.nel.group/api/" + network; // public api service
Const baseUrl: string = "https://apiscan.nel.group/api/" + network; // browser api service

Technical selection

  1. React
  2. React-router
  3. Mobx
  4. Typescript

Code Constraint

Follow the typescript-react specification and the arbnb specification