A knockout tournament planner application written in Hapi and React.
- NodeJS >=18
- MySQL 8
- Create the mysql database for the app
CREATE DATABASE IF NOT EXISTS db_tournament;
CREATE USER 'tournament'@'localhost' IDENTIFIED BY 'my-secret-password-locally';
GRANT ALL PRIVILEGES ON db_tournament.* TO 'tournament'@'localhost';
GRANT CREATE, DROP, REFERENCES, ALTER ON *.* TO 'tournament'@'localhost';- Create a
.envfile insideserver/and setup the database as well as other important environment variables, example:
NODE_ENV=production
PORT="8080"
PROTOCOL="http"
HOST="localhost"
DATABASE_URL="mysql://tournament:my-secret-password-locally@localhost:3306/db_tournament"
COOKIE_SECRET="COOKIE_your_complex_secret_here1" # 32 characters long
JWT_SECRET="TOKEN_your_complex_secret_here12" # 32 characters long
JWT_AUD="tournament_planer"
EMAIL_HOST="smtp.myEmailHost.com"
EMAIL_USER="no-reply@my-email.com"
EMAIL_PASSWORD="my-password"
EMAIL_PORT="587" # 587 or 465- go to
/serverand init the database wih prisma
npx prisma migrate deploy-
go to
/clientand runnpm iandnpm run build -
go to
/serverand runnpm iandnpm run build -
start the server in production mode inside
/serverby runningbuild:serve-prod
