Code Monkey home page Code Monkey logo

neotracker's Introduction

NEO Tracker

CircleCI PRs Welcome

NEO Tracker is a Neo blockchain explorer and wallet.

Contributing

Welcome to the NEO Tracker community! We're always looking for more contributors and are happy to have you. Documentation on how to contribute can be found here.

Environment Setup

The following instructions for how to setup your development environment for NEO Tracker are known to work on Mac, but should work on any Unix-like system.

Requirements

Start a NEO•ONE private network

NEO Tracker is best developed against a private network, which we can setup easily with NEO•ONE.

  • yarn install (install dependencies, including @neo-one/cli)
  • yarn neo-one start network (starts a private network)

By default, NEO•ONE will create a private network with the RPC url http://localhost:9040/rpc, but this can be configured in a NEO•ONE configuration file. Note for this purpose, only the network option is relevant.

Start NEO Tracker

  • yarn install (install dependencies)
  • yarn develop (starts a watched instance of NEO Tracker for development)

By default, yarn develop sets up a SQLite database in the neotracker root directory. If you'd prefer to work with Postgres 10.3, this and other options can be configured in a .neotrackerrc file. See below for the full list of configurable options.

Setup Postgres

If you'd like to use Postgres 10.3, here are some instructions for getting started.

We will use the $PGDATA environment variable in the following examples. You may set this variable with export PGDATA=<directory to store database> if it's not set. For example, on macOS you can use the default data directory with export PGDATA=/usr/local/var/postgres. To make this a "permanent" environment variable, for use in other sessions, you'll want to add export PGDATA="/usr/local/var/postgres" to your .bashrc or .zshrc file(s).

  • initdb $PGDATA (initialize the data directory)
  • pg_ctl -D $PGDATA start (start postgres)
  • createdb neotracker_priv (create the database for NEO Tracker)

To connect this database with neotracker, in the .neotrackerrc file, set dbClient to pg and dbPort to the port the postgres server was started on (defaults to 5432).

General Tips

  • To reset the local database, simply run yarn develop --resetDB.

Options

The full list of configurable options in the .neotrackerrc file. These can be added to the file or passed in as cli arguments.

{
  "type": "all", // Components to run: "all" | "scrape" | "web"
  "port": 1340, // Port the website will be on
  "network": "priv", // Neo network to run on
  "ci": false, // Running as part of continuous integration
  "prod": false, // Compile for production
  "nodeRpcUrl": "http://localhost:9040/rpc", // NEO•ONE Node RPC URL
  "db": {
    "client": "sqlite3", // Database Client - "sqlite3" or "pg"
    "connection": { // Database Connection Configuration (see below for postgres example)
      "filename": "db.sqlite" // local sqlite database filename
    }
  },
  "resetDB": false, // Resets database
  "logLevel": "info", // Sets pino log level globally: "trace" | "debug" | "info" | "warn" | "error" | "fatal" | "silent"
  "apiKeys": {
    "coinMarketCap": "", // API key needed to get current price data from CoinMarketCap. You must supply your own key to make this feature work
    "googleAnalyticsTag": "", // Google Analytics Tag
  }
}

with a postgres db we have two connection options, a connection string or connection object.

connection string configuration:

{
  "db": {
    "client": "pg",
    "connection": "postgresql://localhost:5432/neotracker_priv"
  }
}

connection object configuration:

{
  "db": {
    "client": "pg",
    "connection": {
      "host": "localhost",
      "port": 5433,
      "user": "admin" // optional username
      "password": "password" // optional password
      "database": "neotracker_priv" // optional database name
    }
  }
}

License

NEO Tracker is MIT licensed.

neotracker's People

Contributors

dicarlo2 avatar spencercorwin avatar afragapane avatar danwbyrne avatar davemneo avatar archaengel avatar

Watchers

James Cloos 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.