/MouseRace

Primary LanguageJavaScript

Mouse Race Game

A simple browser-based game where you need to collect and avoid different types of elements. The game is built with HTML, CSS, and JavaScript, and uses Node.js for the backend.

How to Run the Project

Prerequisites

  • Install Node.js version 4.19.2.
  • Make sure you have npm (Node Package Manager) installed.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/mouserace.git
    cd mouserace
  2. Install the necessary packages:

    npm install

Running the Project

Start the server by running:

npm start

Database Setup (Redis)

For Redis on Windows, follow these steps:

  1. Open PowerShell or Windows Command Prompt as an administrator.

  2. Install Windows Subsystem for Linux (WSL) and Ubuntu:

wsl --install
  1. If this is your first time setting up WSL, you'll be prompted to choose a username and password. Make sure to remember them!
  2. Update the package list:
sudo apt update
  1. Install Redis server:
sudo apt install redis-server
  1. Start the Redis server:
sudo service redis-server start
  1. Enable Redis server to start on boot:
sudo systemctl enable redis-server
  1. Check the status of the Redis server:
sudo service redis-server status
  1. Open the Redis CLI to interact with the Redis server:
redis-cli
  1. In the Redis CLI, check if the server is running by typing:
127.0.0.1:6379> ping