Codepath

Setting a Dev Environment in Windows

How to set up a dev environment on Windows

This guide will help you get up and running a development environment on Windows, with recommend programs including Node.js, Express.js & React.js

Install Windows Terminal

Windows Terminal is an improved command line that allows you to run multiple tabs so that you can quickly switch between Windows Command Prompt, PowerShell, or whatever you prefer to use.

Install Visual Studio Code

We recommend you install Visual Studio Code, as well as the following extensions to help development during the program:

To Install extensions on Visual Studio Code:

  1. Open the Extensions window (Ctrl + Shift + X) in VS Code
  2. In the Search box at the top, enter the name of the extension. ie: Live Server
  3. Select Install. After installation, the extension will appear in the "Enabled"

Install Git

  1. Navigate to the latest Git for Windows installer and download the latest version.
  2. Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.
  3. Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation).
  4. Type git version to verify Git was installed.

Install NodeJS and npm

We recommend using a version manager when installing Node.js as versions change very quickly. For Windows, we will install [nvm-windows](https://github.com/coreybutler/nvm-windows) and use it to install Node.js and Node Package Manager (npm). Follow the instructions here:

Install Express.js

Assuming NodeJS and npm were successfully installed, Express.js can be installed via npm with the following command:

npm install express --save

For more information, please follow the Express.js Getting started guide

Install React

To install React, we recommend using [Vite](https://vitejs.dev/guide/) installed vianpm` when setting up a full React.js application:

npm create vite@latest

Install PostgreSQL

  1. Navigate to PostgreSQL Windows installer and download the latest version.
  2. Once the installer has started, follow the instructions as provided in the PostgreSQL Setup wizard screen until the installation is complete.
    • Follow the recommended defaults.
    • When prompted for a superuser (postgres) password, set one and store accordingly.
    • Uncheck option about Stack Builder
  3. Open pgAdmin client (which comes as part of the default installation) to verify the installation.
    • Start the pgAdmin application. The first time you open the application, pgAdmin will prompt you to set a master password. To keep things simple, we suggest to use the same password as for postgres supersuer.
    • Add a New server with the following:
      • Host: localhost
      • Port: 5432
      • Username: postgres
      • Password: The password set for postgres superuser
    • If the connection is successful, you should see live PostgreSQL server stats
  4. To run & use psql command line tool in the terminal, Add PostgreSQL bin directory into the PATH system variable. Follow this instructions

    • Once this is done, psql should be accesible from the command line . ie:

      psql -U postgres
Fork me on GitHub