SmartHoldem Faucet
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
DataModel sql db Apr 15, 2018
api refactoring api wrapper May 18, 2018
frontend
.gitignore ignore May 21, 2018
LICENSE Initial commit Apr 15, 2018
README.md readme Nov 11, 2018
art.txt art May 7, 2018
config.json logo Apr 15, 2018
package.json bcrypt update May 18, 2018
payout.js readme May 21, 2018
server.js

README.md

SmartHoldem Faucet

Wallet Releases

Params

file config.json

  • node - The IP address of the SmartHoldem node the backend will use to query SmartHoldem's blockchain
  • port - The port the web server will listen on (default 8082)
  • payPerClick - How much SmartHoldem to credit users per use of the faucet
  • cooldown - How long users have to wait before using the faucet again (in seconds)
  • paySchedule - When the faucet automatically pays out, in cron format https://github.com/node-schedule/node-schedule
  • payMinimum - The minimum balance users must accrue before they are paid out
  • txFee - The transaction fee to be subtracted from users' payouts. Set to 0 if you want to pay their transaction fees.
  • log - Filename of log file
  • database:username - MySQL username
  • database:password - MySQL password
  • recaptcha:siteKey - ReCaptcha site key https://www.google.com/recaptcha/admin
  • recaptcha:secretKey - ReCaptcha secret key https://www.google.com/recaptcha/admin

Installation

sudo apt-get install mysql-server
sudo apt-get install mysql-client

Create mysqldb name faucet

mysql -u root -p
CREATE DATABASE faucet;
SHOW DATABASES;
exit

Import mysql from /DataModel/db.sql

mysql -u <db_username> -p faucet < /home/<user>/faucet/DataModel/db.sql
git clone https://github.com/smartholdem/faucet.git
cd faucet
npm install
node server --pass "Your Faucet Address Passphrase" or forever start server.js --pass "Your Faucet Address Passphrase"

open http://server_ip:8082

Install nginx

sudo apt-get update
sudo apt-get install nginx

nano /etc/nginx/sites-available/faucet
sudo ln -s /etc/nginx/sites-available/faucet /etc/nginx/sites-enabled/
sudo service nginx restart

Nginx faucet config example

server {
    listen 80;
    listen [::]:80;
    server_name examplesite.com;

    location / {
    proxy_pass http://localhost:8082;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_cache_bypass $http_upgrade;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    add_header Cache-Control no-cache;
    expires 1800s;
    }
}