GithubHelp home page GithubHelp logo

pixelstats's Introduction

Setup

This guide assumes the user has setup a LAMP stack on the server host, and has configured it correctly. To setup pixelstats on a production environment, follow these instructions:

  1. git clone https://github.com/tysonlmao/pixelstats
  2. Give the remote / local server write access to the entire project, so you don't run into permission based issues
# assumes the user is using the default user in ubuntu
sudo chown -R ubuntu:ubuntu pixelstats
  1. Create a config.php inside the /includes folder, and define the following variables
define('RECAPTCHA_SECRET_KEY', 'YOUR_RECAPTCHA_KEY_HERE');
define('PDO_DBNAME', 'pixelstats');
define('PDO_DBUSER', 'root');
define('PDO_DBPASSWORD', 'root');
  1. Create a config.json inside of the /server directory, and define the following key
{
"HYPIXEL_API_KEY": "YOUR_HYPIXEL_API_KEY_HERE"
}
  1. Create a /uploads directory for images to be stored from the posts feed in the root of the project.
  2. On your server host, create a new screen window, navigate to the /server folder inside the pixelstats application, and startup the server, this will create a players.json tinydb database. It should be found at https://localhost:8073. After starting the server, you can exit the screen by pressing ^A ^D on Mac.
screen -S pixelstats-api
# navigate to pixelstats folder
pip install -r requirements.txt
sudo python3 server.py
  1. Use the sql in this gist to import to phpMyAdmin (if applicable) to generate a skeleton of the database: https://gist.github.com/tysonlmao/ab936fb3497897ee5104db0408a24080
  2. To give yourself admin permissions, first create a user using register.php, login and you should be able to access settings, where it says your permission level is "User". Using phpMyAdmin, in the users table, use the enum list to change the permission level to "Admin". To do this with SQL in the command-line, run the following SQL statement
UPDATE users SET user_role = 'Admin' WHERE id = [user_id];
  1. Thats it! You have completed the setup for the pixelstats application. Enjoy!

pixelstats's People

Contributors

tysonlmao avatar

Watchers

 avatar

pixelstats's Issues

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.