forked from hirosystems/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,40 @@ | ||
# Stacks 2.0 Explorer | ||
|
||
### Getting started | ||
![An image of the Stacks Explorer](/explorer-image.png 'Stacks Explorer') | ||
|
||
To run in development mode: | ||
### Getting started | ||
|
||
The Stacks Explorer is built with react, [next.js](https://github.com/zeit/next.js) and [@blockstack/ui](https://github.com/blockstack/ux/tree/master/packages/ui). To run the explorer locally, you can copy this repo and install the dependencies needed. Make sure you have `yarn` installed. | ||
|
||
```sh | ||
yarn | ||
``` | ||
|
||
### Env variables | ||
|
||
The application needs a couple of env variables to work properly: | ||
|
||
``` | ||
MOCKNET_API_SERVER=https://crashy-stacky.zone117x.com | ||
TESTNET_API_SERVER=https://sidecar.staging.blockstack.xyz | ||
``` | ||
|
||
### Run in development mode | ||
|
||
To build and run the application, you can run this yarn task which will launch the application at http://localhost:3000. | ||
|
||
```sh | ||
yarn dev | ||
``` | ||
|
||
### Using a local mocknet | ||
|
||
The Stacks Explorer connects to the [Stacks Blockchain](https://github.com/blockstack/stacks-blockchain) via an API server found here: [`stacks-blockchain-sidecar`](https://github.com/blockstack/stacks-blockchain-sidecar). | ||
The Explorer can connect and switch between a few different versions of the network: testnet, mocknet, and a local instance. To run a local instance of the Sidecar API, [please read this](https://github.com/blockstack/stacks-blockchain-sidecar/blob/master/readme.md#quick-start). | ||
Once you have the Sidecar API running, it should be located at `http://localhost:3999`. You can then from within your local version of the Explorer switch between the three network options: | ||
|
||
![A gif of the network switcher found within the explorer](/localhost-switch.gif 'Switching networks in the explorer') | ||
|
||
### Building for production | ||
|
||
To build for production, run `yarn build` which will run the default next.js build task. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.