All Projects → rsksmart → rsk-explorer

rsksmart / rsk-explorer

Licence: MIT license
RSK Explorer

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
stylus
462 projects
HTML
75241 projects

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;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].