Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Git: What is it and why?

    1. Git is a version control system and GitHub is an internet hosting service using the version control that Git provides. You can find a great presentation on what Git is here.

    2. In order to set up Git on your computer please follow these steps (after creating a GitHub account if you do not already have one). Make sure to do the authentication step so that your computer is tied to your GitHub account.

    3. Now that you have Git installed and have a GitHub account, clone the repository from here to your computer, potentially using git clone in your preferred CLI (i.e. Terminal/Powershell; please use Powershell over Command Prompt on Windows) to pull the project down to your computer. 

    4. After this onboarding, if you are not already, familiarize yourself with Git! There will be some resources at the end of the environment setup and Fall Learning Session #1 is all about Git! 

  2. NodeJS: Version 14 16 Please

    1. Ensure that you have Node.js v16 installed (14 also works though, 18 doesn’t). Any iteration of version 16 will do as long as it is version 16! [Note: as of August September 2022, this is the LTS version found on the main download page. For the future, if this is not an iteration of version 16, either scroll down on this page and search for it manually or download the package for your operating system from this link.]

    2. Check the box to install any additional tools during installation to ensure functionality with VSCode while installing (don’t worry if there are a couple errors here - this tends to happen on new installs).

    3. After installation, confirm that the version is some variant of 16 with the command node -v.

  3. NPM & Yarn

    1. Navigate to the folder of the cloned repository using your CLI (via the cd command).

    2. In your CLI, run npm install -g yarn.

    3. Run yarn install to instruct npm to install all the necessary packages.

...

  1. Install Docker

    1. Download Docker Desktop for your OS and install it following the default steps.

    2. After installation, restart your computer if required.

  2. .env setup

    1. Navigate to the src/backend directory and add a .env file here via the command ni .env [Windows] or touch .env [Mac] in the CLI or create the new file manually in your File Explorer or IDE (we use VSCode - more on that later). 

    2. Paste the following line into the .env file: DATABASE_URL="postgresql://postgres:docker@localhost:5432/nerpm?schema=public"

    3. Navigate to the root directory of the project and run the following two commands (note - if you are already running Postgres from the old manual installation, you must stop it first):

      1. docker run --name finishline -e POSTGRES_PASSWORD=docker -p 5432:5432 -d postgres

      2. docker exec -ti finishline psql -U postgres -c "CREATE DATABASE nerpm;"

    4. Go to your Docker desktop app and the container you just made should appear. If it says “running”, then everything is working!

Method 2: Manual Setup (Not Recommended - Skip to Initial Database Migration if completed above)

...