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:
- Open the Extensions window (Ctrl + Shift + X) in VS Code
- In the Search box at the top, enter the name of the extension. ie: Live Server
- Select Install. After installation, the extension will appear in the “Enabled”
Install Git
- Navigate to the latest Git for Windows installer and download the latest version.
- Once the installer has started, follow the instructions as provided in the Git Setup wizard screen until the installation is complete.
- Open the windows command prompt (or Git Bash if you selected not to use the standard Git Windows Command Prompt during the Git installation).
- Type
git versionto 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 via npm` when setting up a full React.js application:
npm create vite@latest
Install PostgreSQL
- Navigate to PostgreSQL Windows installer and download the latest version.
- 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
- 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
postgressupersuer. - Add a New server with the following:
- Host:
localhost - Port:
5432 - Username:
postgres - Password: The password set for
postgressuperuser
- Host:
- If the connection is successful, you should see live PostgreSQL server stats
- 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
- To run & use
psqlcommand line tool in the terminal, Add PostgreSQLbindirectory into thePATHsystem variable. Follow this instructions-
Once this is done,
psqlshould be accesible from the command line . ie:psql -U postgres
-