-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from thewickest/develop
Develop
- Loading branch information
Showing
23 changed files
with
359 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# ENV='local' # just for local | ||
# BYTE_SCORES_PATH = '/home/pi/RetroPie/scores' # just for local | ||
LOGS_PATH = '/home/pi/RetroStats/logs/game_stats.log' | ||
TEXT_SCORES_PATH = '/home/pi/RetroStats/scores' | ||
API_URL = '<your_api_host>:3001' | ||
API_USER = 'alex' | ||
API_PASSWORD = 'test' | ||
DATABASE_HOST = '<your_database_host>' | ||
DATABASE_NAME = 'retrostats' | ||
DATABASE_USER = 'retrostats' | ||
DATABASE_PASSWORD = 'retrostats' | ||
DATABASE_ROOT_USER = 'root' | ||
DATABASE_ROOT_PASSWORD = 'retrostats' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Makefile | ||
__pycache__ | ||
.env | ||
.env | ||
.env.dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Creating a test database in the Raspberry PI | ||
sudo apt update | ||
sudo apt upgrade | ||
|
||
sudo apt install mariadb-server | ||
|
||
# answer yes to every query | ||
sudo mysql_secure_installation | ||
|
||
sudo mysql -u root -p | ||
|
||
CREATE DATABASE retrostats; | ||
|
||
CREATE USER 'retrostats'@'localhost' IDENTIFIED BY 'retrostats'; | ||
CREATE USER 'retrostats'@'%' IDENTIFIED BY 'retrostats'; | ||
|
||
GRANT ALL PRIVILEGES ON retrostats.* TO 'retrostats'@'localhost'; | ||
GRANT ALL PRIVILEGES ON retrostats.* TO 'retrostats'@'%'; | ||
|
||
FLUSH PRIVILEGES; | ||
|
||
# Enable Mysql ports to be connected outside localhost | ||
|
||
sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf | ||
|
||
# Change the bind-address line to 0.0.0.0. This will allow to receive external connections | ||
# Restart the service | ||
sudo service mysql restart | ||
|
||
CREATE TABLE sessions (id INT AUTO_INCREMENT, initDate DATE, duration INT, score INT, gameId INT, gameName VARCHAR(255), gameEmulator VARCHAR(255), gamePath VARCHAR(255), userId INT, state VARCHAR(255), PRIMARY KEY(id)); | ||
|
||
# This is and insecure practice meant just for development processes. Instead of 0.0.0.0 you should be allowing the host's IP address |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.