Development Environment Set up - Quad22-Technologies/game_rec_wiki GitHub Wiki

Setting up a local development environment for the Game Recommendation project involving Angular, Java, PostgreSQL, and Git requires several steps. Here's a comprehensive guide to help you get started:

Install Prerequisites:

Angular:

  1. Install Node.js and npm by downloading and running the installer from the official website.
  2. Install Angular CLI globally using npm:
    npm install -g @angular/cli
    

Java:

  1. Download and install the Java Development Kit (JDK) from the official Oracle website.
  2. Set up JAVA_HOME environment variable to point to your JDK installation directory. Setting up the JAVA_HOME environment variable varies slightly depending on your operating system. Here's how to do it on different platforms:
Windows:
  1. Open the Control Panel.
  2. Go to System and Security > System.
  3. Click on "Advanced system settings" on the left pane.
  4. In the System Properties window, go to the "Advanced" tab.
  5. Click on the "Environment Variables" button at the bottom.
  6. In the "System Variables" section, click "New..."
  7. Enter JAVA_HOME in the "Variable name" field and the path to your JDK installation directory in the "Variable value" field (e.g., C:\Program Files\Java\jdk-11).
  8. Click "OK" to save the variable.
  9. Click "OK" again to close the System Properties window.
  10. Restart your computer to apply the changes. Setting up a Java backend in Visual Studio Code using Maven and Spring Boot involves several steps. Here's a comprehensive guide to help you get started:
Visual Studio Code:
  1. Download and install Visual Studio Code from the official website.
  2. Install Java Extension Pack for Visual Studio Code from the Extensions view (Ctrl+Shift+X).

PostgreSQL Installation:

  1. Download PostgreSQL 15.7:

  2. Install PostgreSQL:

    • Windows: Double-click the downloaded installer and follow the installation wizard instructions.
  3. Setup PostgreSQL:

    • During the installation process, you will be prompted to set a password for the default PostgreSQL user (postgres). Remember this password as you will need it later.
    • Make sure to note down the port number PostgreSQL is running on (default is 5432).

pgAdmin Installation:

  1. Download pgAdmin:

  2. Install pgAdmin:

    • Windows: Double-click the downloaded installer and follow the installation wizard instructions.
  3. Configure pgAdmin:

    • Launch pgAdmin after installation.
    • Connect to your PostgreSQL server by providing the necessary connection details:
      • Host: localhost (if PostgreSQL is running on the same machine)
      • Port: The port number PostgreSQL is running on (default is 5432)
      • Username: postgres (default PostgreSQL user)
      • Password: The password you set during PostgreSQL installation
    • Once connected, you can explore and manage your PostgreSQL databases using pgAdmin's user-friendly interface.

Windows Command Line and install Git:

Step 1: Open the Windows Command Line

  1. Press Win + R on your keyboard to open the Run dialog box.
  2. Type cmd and press Enter. This will open the Command Prompt.

Step 2: Install Git

To install Git on Windows, follow these steps:

  1. Download Git Installer:

    • Open your web browser and go to the official Git website: https://git-scm.com/
    • Click on the "Download" button for Windows.
  2. Run the Git Installer:

    • Once the download is complete, locate the downloaded .exe file and double-click to run the installer.
    • Follow the setup instructions. You can usually go with the default settings unless you have specific preferences.
  3. Verify Git Installation:

    • After installation, open the Command Prompt again if it's not already open.
    • Type git --version and press Enter. This command will check if Git is installed and show the installed version.

Example Command

git --version

If Git is installed correctly, you should see something like:

git version 2.xx.x

After installing Git, you'll need to configure it with your name and email address. This is important because Git uses this information to attribute commits to you.

Step 3: Configure Git

  1. Open the Command Prompt:

    • Press Win + R, type cmd, and press Enter to open the Command Prompt.
  2. Set Your Name:

    • In the Command Prompt, type the following command and press Enter:
      git config --global user.name "Your Name"
      
    • Replace "Your Name" with your actual name.
  3. Set Your Email Address:

Verify Configuration

To verify that Git has been configured correctly, you can check your settings with the following command:

git config --global --list

This command will list your Git configuration, and you should see something like this:

user.name=Your Name
[email protected]

Example Commands

git config --global user.name "John Doe"
git config --global user.email "[email protected]"
git config --global --list

And that's it! Your Git configuration is now set up with your name and email address.