Course Tools: Windows
Windows Subsystem for Linux
For Windows, it is possible to run Linux as a subsystem, which makes development of applications considerably easier. We strongly recommend installing Windows Subsystem for Linux (WSL).
The following Microsoft tutorial outlines how to install Windows Subsystem for Linux and how to install a Linux distribution. As a Linux distribution, we recommend choosing Ubuntu, which is also the default option in the tutorial.
Installation steps (with WSL)
With Windows Subsystem for Linux installed, you can continue adding software. First, install the editor, VSCode.
- VSCode download page and Deno extension for VSCode. Note that VSCode also has a terminal window that you can use.
Then, after installing VSCode, install Docker Desktop for Windows.
- Docker Desktop for Windows. In addition to the download link, the page has guidelines for enabling Docker support in WSL2. Follow the guidelines.
Then, add the Remote-WSL extension to VSCode.
- Remote-WSL. Remote-WSL allows fast access to WSL in VSCode, making your life easier. The link also shows a brief guideline on working with WSL in VSCode. For additional guidelines, check out the following WSL tutorial.
Now, you can install Deno (on WSL side). At least in the past, VSCode tends to forget the path for Deno whenever the terminal is restarted. To fix this, install Deno with the following command (basically, the command adds an environmental variable that the provides the Deno installation path):
curl -fsSL https://deno.land/x/install/install.sh | sudo DENO_INSTALL=/usr/local sh
With WSL installed and Deno on WSL, you should be able to start Deno on the terminal by writing deno
. Existing the program is done by pressing Ctrl
+ c
.
Finally, if you do not yet have Google Chrome, add it (or similar) to your computer.
Walking skeleton
With all the above tools in place, you can start with the walking skeleton.
The walking skeleton -- a starting point for working on the course assignments -- is available at https://github.com/avihavai/wsd-walking-skeleton. You can download the walking skeleton using git or by simply downloading the walking skeleton as a zip. We strongly, strongly, recommend using it when working on the course assignments.
The walking skeleton has a Docker Compose configuration that launches a web application and a PostgreSQL instance. More details on working with containers are available in the part on Working with Containers.
When you download the walking skeleton, unpack the Zip on the Linux side of the file system.
Once you have downloaded the walking skeleton, you can open it up with VSCode (in WSL!). The walking skeleton can be launched from the command line using the command docker compose up
. This launches the application on your local machine on the port 7777
. When the application is running, you can access it at http://localhost:7777.
To stop the application, press Ctrl
+ c
.
The following video (no audio) briefly demonstrates how the walking skeleton is used within VSCode. The video assumes that you have docker compose available.
YouTube-video
Tämä sivusto käyttää YouTube-videoita. Lue lisätietoja YouTube-videoiden käytöstä YouTuben Terms of Service-sivulla. Salli YouTube-videoiden näyttäminen, jotta voit katsoa videoita.
Read the documentation of the walking skeleton (in the README.md) file for additional details.
File locations
When working with WSL, always store the web application development -related source codes and projects on the Linux file system. The location of the Linux file system can be found by opening explorer and typing the path \\wsl$
.
For additional details, see Working across Windows and Linux file systems
Installation steps (without WSL)
If, for some reason, WSL is not a viable option, you can use the following links for downloading the tools used in the course.
Note that in the current version of the course, we are using the version 1.42.2
of Deno. Once you have installed Deno, you can use the upgrade command to set the version as follows.
deno upgrade --version 1.42.2
VSCode download page and Deno extension for VSCode. Note that VSCode also has a terminal window that you can use.
With the tools in place, check out the following brief introduction to Windows terminal.
Note that the examples in the materials are written for Linux-like distributions. Thus, some of the commands (such as curl
) may not work on Windows as expected.