Skip to content

FangerZero/bowl-games

Repository files navigation

Bowl Games

Application built that will allow an admin to list bowls, teams, and games for users to select who they think will win. YouTube Examples https://www.youtube.com/watch?v=CDrJx63A0F4


Technologies

  • MySQL 8
  • Express
  • Angular 8
  • Node JS 10.16.3
  • Ionic 4
  • PWA

Get Setup

  1. Open terminal
  2. Open Command Palette: Ctrl + Shift + P
  3. Type Select Default Shell
  4. Select Git Bash
  5. Open a New Terminal

Setup Project

  • Clone Project
  1. git clone https://github.com/FangerZero/bowl-games.git You may need to login.
  • Install Dependencies
  1. Run command npm i
  2. Install Angular npm install -g @angular/cli
  3. Insall Ionic npm install -g ionic
  4. Install Express npm install --save express
  5. Install web-push npm install web-push -g

Setup MySQL Windows

Tables created when backend server runs

  • Install MySQL Server
  1. Download and install the latest version of MySQL Server https://dev.mysql.com/downloads/windows/installer/8.0.html
  2. For help https://www.onlinetutorialspoint.com/mysql/install-mysql-on-windows-10-step-by-step.html
  3. Keep Defaults until you get to "Select Products & Features"
  4. Select Products & Features Install MySQL Servers > MySQL Server 8.0.17 -X64 Install Application > MySQL Shell 8.0.17 -X64
  5. Remember your root account password
  6. Click Next/Execute until complete
  • Start MySQL Server
  1. Should auto start
  2. If not go to windows button and type services
  3. Look for the name of your database, right click and start
  • Setup Schema
  1. Open MySQL Workbench
  2. Create a new new connection, if running local use 127.0.0.1:3306
  3. Use the password & user name you created earlier
  4. Once connected on the left look for "Users and Privileges", it' sunder management
  5. Click Add Account
  6. Create a new account and give DBA privileges
  7. Create a new Schema and call it bowl_games
  8. In the code file server/util/database.js change the username and password to the account you just created

You will create the table when you start the NodeJS server.


Setup MySQL Linux

Tables created when backend server runs

  • Install & Update MySQL Server
  1. Run command apt update && sudo apt install mysql-server
  2. Press Y then Enter
  3. Check the status service mysql status
  • Configure Server
  1. mysql_secure_installation
  2. Press Enter
  3. Put in the password and keep it handy
  4. Press Y
  5. Press Enter
  6. Press Y
  7. Press Enter
  8. Press Y
  9. Press Enter
  • Setup Schema
  1. You should be in mysql> command line Below replace with the name of your database
  2. Run command CREATE DATABASE <NAME>;
  3. Run command USE <NAME>;
  4. Create User account. Replace with the root user. Replace with the root user's password.
  5. Run command CREATE USER'<USER>'@localhost' IDENTIFIED BY '<PASSWORD>';
  6. Run command GRANT ALL PRIVILEGES ON <NAME>.* TO '<USER>'@'localhost';
  • Start MySQL Server
  1. Run command `` in terminal

You will create the table when you start the NodeJS server.


#Progress Web Application Setup (PWA) You will need to set this up as there are certain pieces that necessary

  • Vapid Keys
  1. Generate Keys web-push generate-vapid-keys

Start Servers

  • .env File
  1. You need to fill out the .env.sample file
  • Node JS Server
  1. Run command node server.js This will create your tables
  • Client Server w/out PWA
  1. Run command ionic serve
  2. If the command is not found continue below
  3. Open a folder
  4. Right click on This PC
  5. Go to Properties
  6. In the left panel click Advanced System Setting
  7. Click on Environmental Variable
  8. Under System Variable select path variable
  9. Click on Edit
  10. Add variables %AppData%\npm and %ProgramFiles%\nodejs\
  11. Click OK
  12. Restart your machine
  13. Run VSCode as Admin
  • Client Server w/ PWA
  1. Install http-server npm install http-server -g
  2. If the commands are not found, follow steps 2-13 from Client Server w/out PWA
  3. in the project root folder, bowl-games
  4. Run command ionic build --prod
  5. Go to the newly created folder, normally www or build
  6. Run command http-server -p 8081

About

Angular-Ionic-NodeJS Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors