FullStack js test Gilbert Morett ([email protected])
https://react-js-test-gilbert-morett.herokuapp.com/
-Install nodemon globally
npm i nodemon -g
-
Install server and client dependencies
-
yarn (from the root of the project)
-
cd client (from the root of the project)
-
yarn
-
To start the server and client at the same time (from the root of the project)
-
yarn dev
- Full responsive design
- Material design look and feel material-ui
- Node js backend
- Question 1 search by user input
- Question 2 add custom list of keywords by user input
- Question 3 filter list on input by user
- Question 4 slot machine interface
-- MySQL Script generated by MySQL Workbench -- Wed Oct 17 16:52:03 2018 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
-- Schema mydb
-- Schema mydb
CREATE SCHEMA IF NOT EXISTS mydb
DEFAULT CHARACTER SET utf8 ;
USE mydb
;
-- Table mydb
.game_type
CREATE TABLE IF NOT EXISTS mydb
.game_type
(
pk_game_type
INT NOT NULL,
name
VARCHAR(45) NULL,
PRIMARY KEY (pk_game_type
))
ENGINE = InnoDB;
-- Table mydb
.player
CREATE TABLE IF NOT EXISTS mydb
.player
(
pk_player
INT NOT NULL,
username
VARCHAR(45) NULL,
password
VARCHAR(45) NULL,
PRIMARY KEY (pk_player
))
ENGINE = InnoDB;
-- Table mydb
.games
CREATE TABLE IF NOT EXISTS mydb
.games
(
pk_games
INT NOT NULL,
name
VARCHAR(45) NULL,
fk_game_type
INT NOT NULL,
fk_player
INT NOT NULL,
PRIMARY KEY (pk_games
, fk_game_type
, fk_player
),
INDEX fk_games_game_type_idx
(fk_game_type
ASC) VISIBLE,
INDEX fk_games_player1_idx
(fk_player
ASC) VISIBLE,
CONSTRAINT fk_games_game_type
FOREIGN KEY (fk_game_type
)
REFERENCES mydb
.game_type
(pk_game_type
)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_games_player1
FOREIGN KEY (fk_player
)
REFERENCES mydb
.player
(pk_player
)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
-- Table mydb
.country
CREATE TABLE IF NOT EXISTS mydb
.country
(
pk_country
INT NOT NULL,
name
VARCHAR(45) NULL,
PRIMARY KEY (pk_country
))
ENGINE = InnoDB;
-- Table mydb
.country_x_games
CREATE TABLE IF NOT EXISTS mydb
.country_x_games
(
fk_country
INT NOT NULL,
fk_games
INT NOT NULL,
pk_country_x_games
INT NOT NULL,
PRIMARY KEY (fk_country
, fk_games
, pk_country_x_games
),
INDEX fk_country_has_games_games1_idx
(fk_games
ASC, pk_country_x_games
ASC) VISIBLE,
INDEX fk_country_has_games_country1_idx
(fk_country
ASC) VISIBLE,
CONSTRAINT fk_country_has_games_country1
FOREIGN KEY (fk_country
)
REFERENCES mydb
.country
(pk_country
)
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT fk_country_has_games_games1
FOREIGN KEY (fk_games
, pk_country_x_games
)
REFERENCES mydb
.games
(pk_games
, fk_game_type
)
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB;
SET SQL_MODE=@OLD_SQL_MODE; SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
SELECT * FROM player,games WHERE fk_game_type = 1 ;
Note: where the entry game_type 1 = type SLOT "# react-test"