Browse Source

pre-compile less to css for performance

fix-133-memory-crash
Dan Janosik 7 years ago
parent
commit
d66eae86eb
  1. 2
      .gitignore
  2. 12
      README.md
  3. 21
      package.json
  4. 3
      views/layout.pug

2
.gitignore

@ -57,3 +57,5 @@ typings/
# dotenv environment variables file
.env
public/css/radial-progress.css

12
README.md

@ -34,11 +34,13 @@ The below instructions are geared toward BTC, but can be adapted easily to other
## Instructions
1. Clone this repo
2. `npm install` to install all required dependencies
3. Edit the "rpc" settings in [credentials.js](app/credentials.js) to target your node
4. Optional: Change the "coin" value in [config.js](app/config.js). Currently supported values are "BTC" and "LTC".
5. `npm start` to start the local server
6. Visit http://127.0.0.1:3002/
2. `npm install`
3. `npm run build`
4. Edit the "rpc" settings in [credentials.js](app/credentials.js) to target your node
5. Optional: Change the "coin" value in [config.js](app/config.js). Currently supported values are "BTC" and "LTC".
6. Optional: Add an ipstack.com API access key to [credentials.js](app/credentials.js). Doing so will add a map to the /peers page.
7. `npm start` to start the local server
8. Visit http://127.0.0.1:3002/
## Run via Docker

21
package.json

@ -1,9 +1,23 @@
{
"name": "btc-rpc-explorer",
"version": "1.0.0",
"description": "Explorer for Bitcoin and RPC-compatible blockchains",
"private": false,
"scripts": {
"start": "node ./bin/www"
"start": "node ./bin/www",
"build": "npm-run-all build:*",
"build:less": "lessc ./public/css/radial-progress.less ./public/css/radial-progress.css"
},
"keywords": [
"bitcoin",
"litecoin",
"blockchain"
],
"author": "Dan Janosik <janoside@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/janoside/btc-rpc-explorer.git"
},
"dependencies": {
"bitcoin-core": "2.0.0",
@ -16,7 +30,6 @@
"express": "~4.16.3",
"express-session": "1.15.6",
"jstransformer-markdown-it": "^2.0.0",
"less": "3.8.0",
"lru-cache": "4.1.3",
"moment": "^2.21.0",
"moment-duration-format": "2.2.2",
@ -26,5 +39,9 @@
"request": "2.85.0",
"serve-favicon": "^2.5.0",
"simple-git": "1.92.0"
},
"devDependencies": {
"less": "3.8.0",
"npm-run-all": "^4.1.3"
}
}

3
views/layout.pug

@ -15,7 +15,7 @@ html(lang="en")
link(rel="stylesheet", href="https://netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css")
link(rel="stylesheet", href="https://fonts.googleapis.com/css?family=Source+Code+Pro|Ubuntu")
link(rel="stylesheet", href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css")
link(rel="stylesheet/less", href="/css/radial-progress.less", type="text/css")
link(rel="stylesheet", href="/css/radial-progress.css", type="text/css")
link(rel='stylesheet', href='/css/styling.css')
link(rel="icon", type="image/png", href=("/img/logo/" + config.coin.toLowerCase() + ".png"))
@ -164,7 +164,6 @@ html(lang="en")
script(defer, src="https://use.fontawesome.com/releases/v5.0.10/js/all.js", integrity="sha384-slN8GvtUJGnv6ca26v8EzVaR9DC58QEwsIk9q1QXdCU8Yu8ck/tL/5szYlBbqmS+", crossorigin="anonymous")
script(src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js")
script(src="//cdnjs.cloudflare.com/ajax/libs/less.js/3.8.0/less.min.js")
script.
$(document).ready(function() {

Loading…
Cancel
Save