Code Monkey home page Code Monkey logo

travision's Introduction

趣快出行监控平台

简介

采用Beego作为web框架,访问Beego官网来获得更多相关的信息
利用该平台可以查询链上的所有订单、司机还有转账记录信息

部署说明

  1. 配置Golang环境
    访问Golang官网 安装对应的Goalng运行环境,并且设置好$GOROOT和$GOPATH
    Golang版本应该高于1.8
    项目文件夹应该放置在src目录下 一个设定好的$GOPATH应该有如下的目录组织
    $GOPATH
      src
        travision
    cd $GOPATH/src/travision

  2. 配置Beego包(可选)
    参见Beego官网
    若不需要进一步对web框架进行开发,也可以直接使用项目内置的包,参见3

  3. 配置相应的包
    编译所需要的依赖库都包含在vendor文件夹下
    cd vendor
    cp -rf . $GOPATH/src
    注意:如果已经配置了Beego环境,则忽略vendor/github.com/astaxie/beego

  4. 修改IP
    根据部署链的服务器的IP修改travision/gocode/const/const.go中IP参数

  5. 部署合约
    合约代码存放在onekey/contract/
    第一次使用时我们需要重新部署合约,并更新 gocode/contract/const.go 中的参数,具体参看onekey目录下README

  6. 启动服务
    cd $GOPATH/src/travision
    go build
    ./travision
    即可打开服务,开始监听8080端口。浏览器打开即可使用监控平台。

特别说明

  1. 平台每次刷新都会从合约中获取最新的数据,所以刷新时间较长是正常的,可以从运行./travision的终端看到数据读取的进度

  2. example中为一个完整流程的例子,可以参考

travision's People

Contributors

lostpigxx avatar

Watchers

James Cloos avatar Wei Hu avatar  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.