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:
- Install Node.js and npm by downloading and running the installer from the official website.
- Install Angular CLI globally using npm:
npm install -g @angular/cli
Java:
- Download and install the Java Development Kit (JDK) from the official Oracle website.
- 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:
- Open the Control Panel.
- Go to System and Security > System.
- Click on "Advanced system settings" on the left pane.
- In the System Properties window, go to the "Advanced" tab.
- Click on the "Environment Variables" button at the bottom.
- In the "System Variables" section, click "New..."
- 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
). - Click "OK" to save the variable.
- Click "OK" again to close the System Properties window.
- 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:
- Download and install Visual Studio Code from the official website.
- Install Java Extension Pack for Visual Studio Code from the Extensions view (Ctrl+Shift+X).
PostgreSQL Installation:
-
Download PostgreSQL 15.7:
- Visit the official PostgreSQL website: https://www.postgresql.org/download/
- Choose the appropriate installer for your operating system (Windows, macOS, Linux) and download it.
-
Install PostgreSQL:
- Windows: Double-click the downloaded installer and follow the installation wizard instructions.
-
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).
- During the installation process, you will be prompted to set a password for the default PostgreSQL user (
pgAdmin Installation:
-
Download pgAdmin:
- Visit the pgAdmin website: https://www.pgadmin.org/download/
- Choose the appropriate installer for your operating system (Windows, macOS, Linux) and download it.
-
Install pgAdmin:
- Windows: Double-click the downloaded installer and follow the installation wizard instructions.
-
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
- Press
Win + R
on your keyboard to open the Run dialog box. - Type
cmd
and pressEnter
. This will open the Command Prompt.
Step 2: Install Git
To install Git on Windows, follow these steps:
-
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.
-
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.
- Once the download is complete, locate the downloaded
-
Verify Git Installation:
- After installation, open the Command Prompt again if it's not already open.
- Type
git --version
and pressEnter
. 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
-
Open the Command Prompt:
- Press
Win + R
, typecmd
, and pressEnter
to open the Command Prompt.
- Press
-
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.
- In the Command Prompt, type the following command and press
-
Set Your Email Address:
- Next, set your email address with the following command:
git config --global user.email "[email protected]"
- Replace
"[email protected]"
with your actual email address.
- Next, set your email address with the following command:
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.