GithubHelp home page GithubHelp logo

honj51 / gachain-front Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5.84 MB

政务链(智乾区块链)前端 - GAChain front end.

Home Page: https://gachain.org/

License: GNU Lesser General Public License v3.0

CSS 18.46% HTML 0.09% TypeScript 81.34% JavaScript 0.11%

gachain-front's Introduction

PRs Welcome Gitter

政务链前端

该项目是基于 Create React App。你可以在那里获取到它的大部分信息。


安装�

该项目需要安装 Node.js v6+ 才能运行。

我们使用 yarn 作为包管理工具, 所以你也需要安装yarn。具体的安装方法请到 npm官网 安装项目依赖并启动服务器。

$ yarn install
$ yarn start

yarn start 将请求服务器的地址默认绑定到http://127.0.0.1:7079/api/v2。 你还可以使用yarn start-desktop在桌面环境中调试项目。

如果你需要将请求地址绑定为其它的值,可以设置REACT_APP_API_URL这个参数来改变请求服务器的地址。

示例

$ REACT_APP_API_URL='http://example.org:8080/api/v2' yarn start

在开发服务器的环境下会发出某些错误警告,并以可读格式报告错误。你可以不用管它,注意:它只适合开发/测试。 如果要在生产环境中使用它,你需要构建项目。


构建项目

如果你还没有安装项目依赖,请安装:

$ yarn install

如果你的后端使用的API地址不是默认的http://127.0.0.1:7079/api/v2, 那么你需要通过REACT_APP_API_URL参数手动指定请求的地址

示例

$ REACT_APP_API_URL='http://example.org:8080/api/v2' yarn build

项目构建完毕之后,在你的项目根目录下你会找到 build/ 的文件夹。你可以使用任意网络服务器来访问它。


构建桌面应用程序

如果你还没有安装项目依赖,请先安装:

$ yarn install

构建项目 手动指定REACT_APP_API_URL参数将应用程序绑定到后端使用的API

示例

$ REACT_APP_API_URL='http://example.org:8080/api/v2' yarn build-desktop

项目构建完成后,你需要使用release命令来打包你的应用程序。你还需要指-publish neve,这样你的项目就不会被发布到github上。

可以用m/w/l参数的组合来指定需要构建应用程序的平台,其中m代表macOS,w代表windows,l代表linux。

示例

$ yarn release --publish never -mwl

将发布macOS,windows和linux的桌面应用程序。


有问题

如果你在使用Gachain时遇到任何问题,请随时与我们联系 [email protected]

gachain-front's People

Contributors

zhouxianyou avatar

Watchers

James Cloos avatar honj51 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.