Skip to content

Windows Setup with WSL2

Austin Schey edited this page Sep 14, 2021 · 19 revisions

Install WSL2 and Ubuntu 20.04 LTS

Follow the instructions here and install Ubuntu 20.04 LTS when you get to that step.

Once you have Ubuntu installed, in the start menu fire up Ubuntu 20.04 LTS.

Install and update your Ubuntu

In the command prompt that starts your Ubuntu session:

  • sudo apt update
  • sudo apt dist-upgrade
  • sudo apt install tmux zsh

Install nodejs

curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt-get install -y nodejs

Test you have Node v16 installed. If you run node -v, you should get something like v16.x.x

Clone the repo and test it works

In the main readme, follow the instructions from Clone and go into the application until you get to the Postgres section

Install Postgres

sudo apt install postgresql postgresql-contrib

⚠️ In the repo readme, when you see a command like createdb or psql you have to prepend sudo -u postgres. This is because Ubuntu/Linux has a stronger separation of users. As a normal user, you shouldn't have access to system apps like Postgres. sudo -u postgres allows you to impersonate the postgres user that has access to the postgress application.

  1. sudo /etc/init.d/postgresql start to start postgres
  2. sudo update-rc.d postgresql defaults to allow postgres to automatically start when you restart Ubuntu

Follow the instructions in the readme to set up postgres. Skip steps 1-3 and jump to step 5.

Install an IDE

I personally use VSCode but any IDE you're comfortable with should work.

Because we are running our code in a virtual machine on WSL, you will need to follow the instructions to enable the Remote Development extension pack. Note this pack only works for VSCode, but your IDE should have something similar.

Tips for happier developer experience

When you get a chance spend some time learning the basics of tmux