filecoin-explorer
filecoin-explorer copied to clipboard
Filecoin block explorer
Filecoin Explorer (filecoin-explorer)
Filecoin block explorer
An open source Filecoin block explorer written in JavaScript.
Table of Contents
- Development
- Install Node
- Clone
- Install Dependencies
- Launch the Development Server
- Linting
- Usage
- Start a Filecoin Node
- Launch the JavaScript Client
- Contribute
- License
Development
Check the docs for create-react-app
Install Node
The build process for filecoin-explorer requires at least Node version 8.0.0, which you can download here.
Clone
> git clone [email protected]:filecoin-project/filecoin-explorer.git
Install Dependencies
filecoin-explorer's dependencies are managed by Yarn, which you can download here. To install filecoin-explorer's build and development dependencies, run:
> cd filecoin-explorer
> yarn install
Launch the Development Server
During development, the filecoin-explorer is served from a locally running webpack-dev-server. The development server is configured to automatically reload source files as they are changed. To launch the server, run:
> yarn start
Important: Access-Control-Allow-Origin Headers
By default, HTTP responses from the go-filecoin node will have their Access-Control-Allow-Origin header set to
http://localhost:8080. If want to serve the filecoin-explorer from a different host or port, you'll need to
reconfigure the go-filecoin daemon accordingly.
Linting
This project uses StandardJS for linting and code-formatting. To use StandardJS, run:
> yarn lint
If you want starndard to fix your issues for you, run:
> yarn lint-fix
Usage
Start a Filecoin Node
The Filecoin Explorer JavaScript application communicates via HTTP requests with a locally-running Filecoin node. For instructions on building a Filecoin node, review the go-filecoin README. Then, run:
> ./go-filecoin daemon
Launch the JavaScript Client
With the development server running (see Launch the Development Server, above), open your web browser and navigate to http://localhost:8080. From here, you can explore the Filecoin blockchain.
Contribute
See the contribute file.
If editing the readme, please conform to the standard-readme specification.
License
The Filecoin Project is dual-licensed under Apache 2.0 and MIT terms:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)