Skip to content

sajjadghorbani80/WebOnline-Game

Repository files navigation

🎮 Web Online Game Project

The Web Online Game is an exercise project to learn programming with the JavaScript stack and related technologies. In this project, the user can play a game (Guess Number Game) and earn points after registering and entering the site.


🛠️ Requirements for run project

  1. Docker
  2. PostgreSql image

▶️ Run the project


🐬 Run with Docker

  1. install docker
  2. run docker desktop
  3. clone the repo
git clone https://github.com/sajjadghorbani80/WebOnline-Game.git
  1. Go to Client folder
cd client
  1. Install requirements
npm i
  1. Compile TS files to JS
npx tsc
  1. Go to Server floder
cd ../server
  1. Install requirements
npm i
  1. Compile TS files to JS
npx tsc
  1. In the root folder of project you can find a config file named .env.
  2. Configure file to your needs or just use the default settings.
  3. In the server folder, you can find .env file that contains the PostgreSql connection string. Change its value according to your configuration.
  4. Also in client > src > assets > js path you can find config.js file that contains API_URL and Token_Header_Key, If you have changed .env file, you must change config.js file accordingly.
  5. To start the application just use the command below:
docker compose up -d
  1. Intialize DataBase

15.1. Create DataBase

npx prisma db push

15.2. Add sample Data

sudo npx ts-node --esm prisma/seed.ts
  1. After successful building go to http://localhost:8080 (with default settings).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published