Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Feb 17, 2019
1 parent 86dde5d commit 7f46ed2
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 44 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
/.pnp
.pnp.js

# yarn.lock is used instead
/package-lock.json

# testing
/coverage

Expand Down
38 changes: 28 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
[travis-image]: https://api.travis-ci.org/solana-labs/blockexplorer.svg?branch=master
[travis-url]: https://travis-ci.org/solana-labs/blockexplorer

# Working with Block Explorer

# Solana Block Explorer
## Prerequisites

### Redis
* Ubuntu: `apt-get install redis-server`
* MacOS: `brew install redis`
Expand All @@ -16,13 +14,37 @@
* Install yarn (typically `npm install -g yarn`)

## Quick Start
Setup the workspace, ensure Redis is running
Ensure Redis is running with `redis-cli ping`. If the ping fails, start redis
with:
```bash
$ yarn
$ redis-server &
```

Start the API service and Web UI:
Then install the block explorer:
```bash
$ npm install -g @solana/blockexplorer
```

Build and run a local Solana node:
```bash
$ git clone https://github.com/solana-labs/solana.git
$ cd solana/
$ cargo build --all
$ ./run.sh
```

In another terminal start the block explorer:
```bash
$ solana-blockexplorer
```

## Development Info
Setup the workspace:
```bash
$ yarn
```

Start the API service and Web UI manually with:
```bash
$ yarn start:api
$ yarn start:ui
Expand All @@ -37,7 +59,3 @@ and if desired for UI testing:
```bash
$ ./multinode-demo/client.sh --tx_count 40 --threads 2 -z 400
```

## Running the production Web UI
$ yarn build:ui
$ PORT=80 npx serve -s build
7 changes: 5 additions & 2 deletions bin/blockexplorer.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/usr/bin/env bash
set -e


rootDir=$(
cd "$(dirname "$0")";
node -p '
let p;
try {
p = require.resolve("../lib/node_modules/@solana/blockexplorer");
p = require.resolve("../lib/node_modules/@solana/blockexplorer/package.json");
} catch (err) {
p = require.resolve("../package.json");
}
Expand All @@ -21,6 +20,10 @@ if [[ ! -d build || ! -f build/api/api.js ]]; then
exit 1
fi

set -x

redis-cli ping

node build/api/api.js &
api=$!

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "@solana/blockexplorer",
"version": "0.0.2",
"version": "0.0.3",
"license": "MIT",
"dependencies": {
"@solana/web3.js": "^0.14.7",
"base-58": "^0.0.1",
"cors": "^2.8.5",
"express": "^4.16.4",
"express-ws": "^4.0.0",
"ip": "^1.1.5",
"lodash": "^4.17.11",
"nocache": "^2.0.0",
"redis": "^2.8.0"
Expand All @@ -26,7 +27,6 @@
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.0",
"node-ip": "^0.1.2",
"prettier": "^1.16.4",
"qrcode.react": "^0.9.2",
"react": "^16.7.0",
Expand Down
37 changes: 7 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1568,18 +1568,18 @@ async-limiter@~1.0.0:
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==

async@, async@^2.1.4, async@^2.5.0:
async@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=

async@^2.1.4, async@^2.5.0:
version "2.6.2"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381"
integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==
dependencies:
lodash "^4.17.11"

async@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=

asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
Expand Down Expand Up @@ -3009,7 +3009,7 @@ color@^3.0.0:
color-convert "^1.9.1"
color-string "^1.5.2"

colors@^1.0.3, colors@^1.1.2:
colors@^1.1.2:
version "1.3.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d"
integrity sha512-mmGt/1pZqYRjMxB1axhTo16/snVZ5krrKkcmMeVKxzECMMXoCgnvTPp10QgHfcbQZw8Dq2jMNG6je4JlWU0gWg==
Expand Down Expand Up @@ -7464,14 +7464,6 @@ node-int64@^0.4.0:
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=

node-ip@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/node-ip/-/node-ip-0.1.2.tgz#3dacccacb3957c1f5a7f11dd6d724b16c3ab505b"
integrity sha1-PazMrLOVfB9afxHdbXJLFsOrUFs=
dependencies:
colors "^1.0.3"
node-localip "0.0.2"

node-libs-browser@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77"
Expand Down Expand Up @@ -7501,14 +7493,6 @@ node-libs-browser@^2.0.0:
util "^0.11.0"
vm-browserify "0.0.4"

[email protected]:
version "0.0.2"
resolved "https://registry.yarnpkg.com/node-localip/-/node-localip-0.0.2.tgz#1d408a116aeaa7c193194ffc8363d3fab3bc6a2c"
integrity sha1-HUCKEWrqp8GTGU/8g2PT+rO8aiw=
dependencies:
colors "^1.0.3"
wmic "0.0.7"

node-notifier@^5.2.1:
version "5.4.0"
resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.0.tgz#7b455fdce9f7de0c63538297354f3db468426e6a"
Expand Down Expand Up @@ -11187,13 +11171,6 @@ wide-align@^1.1.0:
dependencies:
string-width "^1.0.2 || 2"

[email protected]:
version "0.0.7"
resolved "https://registry.yarnpkg.com/wmic/-/wmic-0.0.7.tgz#a491a1c6f910f6da368def294796694cf9689785"
integrity sha1-pJGhxvkQ9to2je8pR5ZpTPlol4U=
dependencies:
async ""

wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
Expand Down

0 comments on commit 7f46ed2

Please sign in to comment.