Skip to content

rsksmart/rsk-explorer

Folders and files

NameName
Last commit message
Last commit date
Feb 6, 2025
Dec 19, 2024
Oct 10, 2024
Mar 14, 2025
Jan 8, 2021
Jul 23, 2018
Dec 9, 2017
Jul 11, 2024
Jul 11, 2024
Jul 11, 2024
May 20, 2024
Feb 9, 2024
Dec 12, 2018
Jan 27, 2021
Aug 12, 2024
Dec 19, 2024
Dec 19, 2024
Dec 24, 2019
Aug 13, 2020
Jul 31, 2024
Mar 14, 2025
Jul 11, 2024

Repository files navigation

OpenSSF Scorecard CodeQL RSK Logo

rsk-explorer client

Web client for rsk-explorer-api

Tasks

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# serve with tracking
npm run dev-with-tracking

# build for production with minification
npm run build

# build for production with google tracking and hotjar
# you must set the GA-TAG and HOTJAR_ID first, see 'Settings'
npm run build-with-tracking

Deployment

Install dependencies

npm install

Settings

The configuration is provided through this environment variables:

  • WS_URL: rsk-explorer-api WS url (backend)
  • STATS_URL: rsk stats web (link redirect the 'stats' link)
  • GA_TAG: (optional) Google analytics tag.
  • HOTJAR_ID: (optional) Hotjar ID.

E.g. to change the backend url :

  export WS_URL=wss://backend.rsk.co

Building for production

  npm run build

Serve ./dist folder on web server

HTTP Server configuration

The client uses vue-router HTML 5 History mode, this requires a special configuration of the web server:

nginx:

location / {
  try_files $uri $uri/ /index.html;
}

Double slashed paths

Double slashed paths fail on router resolution

E.g. https://explorer.rsk.co//block/123 To avoid this errors use the HTTP Server to rewrite the paths.

nginx:

  merge_slashes off;
  rewrite ^(.*?)//+(.*?)$ $1/$2 permanent;