projenix / nicehash-calculator-web

A website that estimates the profitability of buying hashing power on NiceHash

Home Page:https://nicehash.garbomuffin.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Source code for a website that estimates the profitability of buying hashing power on NiceHash. If you're here for estimations then go to the website: https://nicehash.garbomuffin.com

Everything here is instructions to run your own copy of the website. (for developing or something)

This README is incomplete. You can make an issue if you need help trying to run this locally.

Cloning

# remember the --recursive argument
$ git clone --recursive https://github.com/GarboMuffin/nicehash-calculator-web

Installing and building

# move to where you cloned the repo
$ cd /path/to/repo/

# install the dependencies for the website
$ npm install
# build js and scss
$ npm run build

# now for the nicehash-calculator base...
$ cd nicehash-calculator
# get the dependencies
$ npm install
# build typescript
$ npm run build

Whenever you pull you will probably have to run some similar commands.

Development setup

Download the latest data.json and save it as data.json in the root of this repository. When in a non-production environment the program will not do any automatic updates for various reasons. For most development purposes the age of the data doesn't matter. There just has to be something to render.

In Linux this is easy to do from the command line:

$ cd /path/to/repo/
$ wget https://nicehash.garbomuffin.com/data.json

If you want automatic updates (such as when in production) create a file named .env in the root of the repository and add this line: NODE_ENV=production.

Running it

$ node index
...

By default it listens on port 8080. Visit http://localhost:8080 in your browser to visit the site. You can change the port by adding PORT=1234 to .env in the root of this repo. (you may have to make the file)

About

A website that estimates the profitability of buying hashing power on NiceHash

https://nicehash.garbomuffin.com/

License:MIT License


Languages

Language:JavaScript 73.3%Language:HTML 22.3%Language:CSS 4.3%