npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@neotracker/core

v1.4.1

Published

NEO Tracker external api.

Downloads

1,958

Readme

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.