Git Product home page Git Product logo

faucet's Introduction

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;
    }
}

faucet's People

Contributors

technologiespro avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.