Skip to content

syncing the updated #1

Open
wants to merge 138 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
f694407
Test
handley7 Sep 17, 2019
fae1963
1.3.2
nathwan2 Sep 17, 2019
ffe6e8c
added notes on running nodejs on Windows
aa7401 Sep 18, 2019
ddb628d
Fixed inconsistency with test suite
harjaus Sep 20, 2019
660bcf1
Added missing file for sheet 06.
harjaus Sep 20, 2019
0d5f324
Merge pull request #6 from harjaus/master
aa7401 Sep 20, 2019
73dfc6a
Changed sheet to specify which folder
harjaus Sep 20, 2019
3e5f457
Added missing files
harjaus Sep 20, 2019
e486943
Merge pull request #7 from harjaus/master
harjaus Sep 20, 2019
d2c7f53
Minor spelling mistake
harjaus Sep 21, 2019
745c463
Merge pull request #8 from harjaus/master
harjaus Sep 21, 2019
beb81da
Merge remote-tracking branch 'upstream/master'
handley7 Sep 21, 2019
9a87865
Update 01 Setup.md for Windows 10 WSL setup
handley7 Sep 21, 2019
36d7da9
Update 01 Setup.md
handley7 Sep 21, 2019
a8c2edb
Merge branch 'master' of https://github.coventry.ac.uk/handley7/found…
handley7 Sep 21, 2019
c6dd19d
Update images for WSL tutorial in 01 Setup.md
handley7 Sep 21, 2019
08c89b7
Update 01 Setup.md
handley7 Sep 21, 2019
de5af6f
Merge pull request #9 from handley7/master
aa7401 Sep 21, 2019
2c5dcaa
improved clarity of task
aa7401 Sep 22, 2019
da834a3
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Sep 22, 2019
1c19206
updated extensions list
aa7401 Sep 24, 2019
83c9e2d
update
nathwan2 Sep 24, 2019
847df4b
update
nathwan2 Sep 24, 2019
2456d1c
minor spelling amendment
charle44 Sep 24, 2019
afd9df0
Merge pull request #10 from charle44/patch-1
harjaus Sep 24, 2019
c78e77d
updated name of extension
aa7401 Sep 26, 2019
fd6f91d
added notes on debugging the test explorer
aa7401 Sep 26, 2019
1054bd3
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Sep 26, 2019
b9fed75
added extra task to lab
aa7401 Sep 26, 2019
6f04e7d
test
nathwan2 Sep 27, 2019
ddc5667
shortcut
charle44 Sep 28, 2019
c5881dd
03_html/05_semantic change & video word change
charle44 Oct 1, 2019
44e093f
updated the lab list and deleted old notes
aa7401 Oct 2, 2019
7d0bc7d
Merge pull request #13 from charle44/patch-2
aa7401 Oct 2, 2019
888e37d
Merge pull request #15 from charle44/patch-4
aa7401 Oct 2, 2019
f143f1b
added async examples
aa7401 Oct 3, 2019
2f87891
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 3, 2019
f24e9df
Fixed error in code under 4.4 Static Members
aa6164 Oct 6, 2019
c593b3e
added login project
aa7401 Oct 7, 2019
53fc0b6
updated lab sheet
aa7401 Oct 7, 2019
c1649a0
fixed missing file
aa7401 Oct 8, 2019
7cb6b16
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 8, 2019
15b4db6
fixed issue
aa7401 Oct 8, 2019
6340dc7
fixed module name
aa7401 Oct 8, 2019
8449b58
another bug fixed
aa7401 Oct 8, 2019
cae34b6
push
nathwan2 Oct 8, 2019
ece3438
oo
nathwan2 Oct 8, 2019
357f86f
added open file debug option
aa7401 Oct 8, 2019
006c796
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 8, 2019
21c2366
replaced api used
aa7401 Oct 9, 2019
393a730
added a currencies data file
aa7401 Oct 9, 2019
ca82a75
fixed all urls
aa7401 Oct 9, 2019
7564ca2
added async functions file
aa7401 Oct 9, 2019
053389a
deleted old readme file
aa7401 Oct 9, 2019
d4ddbc7
started mocking file system
aa7401 Oct 9, 2019
64be017
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 9, 2019
87c1585
fixed text input issue
aa7401 Oct 11, 2019
c8fcbf0
Merge pull request #1 from web/master
kenyonJ Oct 11, 2019
111e500
Updated Git Installation
aa7401 Oct 12, 2019
23eca50
Cleaned Up Files
aa7401 Oct 12, 2019
a43b857
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 12, 2019
9b23edb
Updated ESLint and JSDoc Exercise
aa7401 Oct 12, 2019
d1c17c9
Fixed Callback Code
aa7401 Oct 12, 2019
9629baa
Updated Lab Sheet
aa7401 Oct 12, 2019
c0aa4ed
Completed Lab Sheet
aa7401 Oct 12, 2019
63ea40e
grammatical change
charle44 Oct 12, 2019
54e75d8
Updated the Nested Callback Lab
aa7401 Oct 15, 2019
c3cc178
Added Promise Working Example
aa7401 Oct 15, 2019
a736124
bug fix
aa7401 Oct 15, 2019
cc11aad
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 15, 2019
6d5c6a9
Fixed Promise Bug
aa7401 Oct 15, 2019
edceed4
Modified the Modularity Exercise
aa7401 Oct 18, 2019
dd1f05f
Fixed Some Spelling Errors
aa7401 Oct 18, 2019
96e8e4b
Added More Exercises
aa7401 Oct 20, 2019
bbcc9ab
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 20, 2019
b385bb0
Removed Module Call
aa7401 Oct 22, 2019
93cc681
Added Code to Callback
aa7401 Oct 22, 2019
648ead1
added instructions for Win10 Users
aa7401 Oct 22, 2019
c035290
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Oct 22, 2019
ba038cb
Added Component Notes
aa7401 Oct 23, 2019
8b1f989
fixed typo in 3.3
charle44 Oct 23, 2019
0e7ec41
typo ammendment
charle44 Oct 23, 2019
210ae92
Added Notes on Installing the Browser Preview
aa7401 Oct 25, 2019
48310c0
resolved Issue #25
bordasb Oct 25, 2019
fbf8869
Merge pull request #27 from charle44/patch-7
aa7401 Oct 26, 2019
59e3e7f
Merge pull request #26 from charle44/patch-6
aa7401 Oct 26, 2019
e12506b
Merge pull request #18 from charle44/patch-5
aa7401 Oct 26, 2019
afa4426
Merge pull request #19 from nathwan2/master
aa7401 Oct 26, 2019
fd08afd
Merge pull request #21 from kenyonJ/master
aa7401 Oct 26, 2019
a4ffe9c
Added Notes on Script Explorer
aa7401 Nov 2, 2019
c46de19
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Nov 2, 2019
ce57bbc
#28 mock-fs example created
bordasb Nov 4, 2019
b0d1c68
fixes done to file_system unit test
Nov 8, 2019
7cf77b6
trying to fix file_system unit test
Nov 8, 2019
5b4ac41
Removed Merge Conflict
aa7401 Nov 8, 2019
c4d788d
Replaced Module
aa7401 Nov 8, 2019
a98fdec
Merge branch 'master' of https://github.coventry.ac.uk/web/foundation
aa7401 Nov 8, 2019
54a02fa
Now we throw specific errors, not generic
harjaus Nov 8, 2019
a69a9c8
Added dependency
harjaus Nov 8, 2019
bc98b02
We no longer done.fail() on everything, we expect no errors on catch
harjaus Nov 8, 2019
6e14868
trying to fix mockfs exercise
Nov 8, 2019
5e5e55d
Now throws correct error on file not existing
harjaus Nov 8, 2019
39db18b
Reading mocking works
harjaus Nov 8, 2019
8102229
Now reads as binary
harjaus Nov 8, 2019
0b9b9e1
Now writes synchronously, fixes bug
harjaus Nov 8, 2019
39518ac
Now can mock writing to filesystem
harjaus Nov 8, 2019
213478a
Removed unnecessary files
harjaus Nov 8, 2019
0789e71
Merge branch 'fixingMockFS'
harjaus Nov 8, 2019
d4fc244
minor typo and semantic fixes
bordasb Nov 11, 2019
2cf6567
corrected the bracket notation example
bordasb Nov 12, 2019
9ff5136
fixed displayed directory tree
bordasb Nov 12, 2019
92f29a5
fixed displayed directory tree
bordasb Nov 12, 2019
7af1d8d
Added Notes on managing modules
aa7401 Nov 14, 2019
30c5f0b
improvements made to file_system mock-fs exercise
bordasb Nov 25, 2019
333dcb2
#28 create example to demonstrate saving file to mock-fs
bordasb Nov 25, 2019
d8ae634
#28 webserver handles incoming files
bordasb Nov 25, 2019
2940aab
Merge branch 'fixingMockFS'
bordasb Nov 25, 2019
b166a8c
Added New Materials
aa7401 Nov 29, 2019
502647f
Merge pull request #35 from web/iss034/explain-context
aa7401 Nov 29, 2019
9cc86d4
Added Manual Mock Example
aa7401 Jan 12, 2020
d43bfb8
removed unintentional inserted solutions by nathwan2 from 02/01/index…
bordasb Jan 25, 2020
2bc3e3d
added guide about npm install -production
bordasb Jan 25, 2020
e01b52b
fixed dependencies in package.json, added start script
bordasb Jan 25, 2020
a5d0506
removed npm-debug.log bloat file from root
bordasb Jan 25, 2020
5786574
removed unnecessarily pasted example code which came from 07 Unit Tes…
bordasb Jan 25, 2020
3bf1be1
added missing line
bordasb Jan 25, 2020
46cab3c
corrected lab code
aa7401 Jan 30, 2020
666baa5
merged corrected content
bordasb Feb 2, 2020
be072e1
solutions added for 02/01/index 1.3.2 TYU
bordasb Feb 2, 2020
034f604
fine tuned 02_HTTP.md, added solutions for 02_HTTP
bordasb Jun 26, 2020
77a9bdf
moved npm chapter to 01_Setup.md
bordasb Jul 1, 2020
f68c14c
updated and corrected the content in 03_HTML.md and exercises/03_HTML/
bordasb Jul 13, 2020
bac10be
solutions added for 03_html
bordasb Jul 14, 2020
c2c0cc9
fixed minor errors
bordasb Sep 14, 2020
e4321b0
fixed errors and added all solutions up to the end of 04_css
bordasb Sep 19, 2020
078678a
fixed errors and added all solutions up to the end of 05_javascript
bordasb Sep 29, 2020
059e611
fixed errors and added solutions for 06_code_quality
bordasb Oct 7, 2020
276525a
sample solutions and error fixes for 07_unit_testing
bordasb Oct 25, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
"no-var": 2,
"prefer-arrow-callback": 1,
"prefer-const": 2,
"prefer-template": "error",
"quotes": [1, "single"],
"semi": [1, "never"],
"space-before-blocks": ["error", { "functions": "always", "keywords": "always", "classes": "always" }],
"space-before-function-paren": [2, "never"],
"strict": [2, "global"],
"yoda": 2
},
"overrides": [{
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ coverage/
docs/
sessions/
screenshots/*
out/

# sqlite databases
# *.db
Expand Down
6 changes: 6 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Current Opened File",
"program": "${file}"
},
{
"type": "node",
"request": "launch",
Expand Down
60 changes: 60 additions & 0 deletions 01 Setup Win10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

# Setup for Windows 10 Users

The tools used in this module are designed to be used in a Unix or Linux environment. Whilst this will create challenges for Windows 10 user there are some steps you will need to take. Please read and follow the steps below carefully:

Install the Windows Subsystem for Linux (WSL). Open PowerShell as Administrator and run:

``` shell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
```

Restart your computer when prompted.

Now install Visual Studio Code and once launched install the [remote-wsl](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-wsl) component by Microsoft. You should also install the [browser-preview](https://marketplace.visualstudio.com/items?itemName=auchenberg.vscode-browser-preview) component which will allow you to open html web pages.

![remote-wsl](exercises/.images/remote-wsl.png)

Now you need to install Ubuntu. This can be found by searching for `run linux on windows` in the Microsoft Store. You will be presented with the following screen.

![Microsoft Store](exercises/.images/store.png)

Choose the Ubuntu operating system (v18.04 LTS) and install. Once installed, click on the **Launch** button, this will open a console window and you will need to wait for a few minutes for the installation to complete.

## Cloning the Forked Repository

You will now need to fork the foundation lab by clicking on the Fork button. This will create a copy of the repository. See the standard setup instructions for more details.

Now you can clone your forked repository by running the following command in the Ubuntu console, replacing xxx with the URL of your repository.

```shell
git clone xxx
```

This will create a directory called `foundation` in the Ubuntu console. The final step is to launch VS Code from within the WSL environment by running the following command:

```shell
code foundation
```

This will launch VS Code from within the WSL with the contents of the `foundation/` directory. If you open the integrated terminal (using the **Terminal** menu) you will see that you have the full ubuntu bash shell. You can now run all the remaining steps from this integrated terminal, just as you would for a standard Linux install.

## Installing NodeJS

These steps are identical to those used on a full Ubuntu installation. Start by installing the Node Version Manager (NVM) tool:

```shell
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.0/install.sh | bash
nvm --version
nvm install node
```

If the `nvm` command is not found you will need to reload the shell:

```shell
source ~/.profile
```

Now try to install again.

Now you can go directly to step 4 in the standard setup instructions.
160 changes: 114 additions & 46 deletions 01 Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

In this worksheet you will learn how to configure your work environment using VS Code. You should start by installing **Visual Studio Code** (NOT VISUAL STUDIO!) from the [website](https://code.visualstudio.com), note that it might already be installed. If you are using a Coventry University computer and the software is not installed you can do this using AppsAnywhere.

If you are using Windows 10 you will also need to install [Git](https://git-scm.com/download/win), this may already be installed on a Coventry University computer.
If you are using Windows 10 you will also need to install [Git](https://git-scm.com/download/win), this may already be installed on a Coventry University computer. If you are on MacOS you may already have it installed as it comes with the XCode IDE but if you have recently updated your OS you may need to run the `xcode-select --install` command to update the **Xcode Command-line Tools** but if you don't want to install XCode you can install git using [HomeBrew](http://brew.sh/) using the `brew install git` command. If you are running Ubuntu you can install it using the `sudo apt install git` command.

DO NOT INSTALL THE GIT GUI TOOLS!

Visual Studio Code comes with an integrated **Terminal** that can be used instead of the standard _Command Prompt_ or _Terminal_. If you are using Linux or MacOS this will give you a Bash prompt however on Windows 10 it defaults to the _Command Prompt_ and will need to be changed to the _Bash Shell_.

Expand All @@ -13,6 +15,37 @@ Press CTRL-SHIFT-P and a selection box should appear at the top of the editor. T

Now the integrated terminal uses the _Bash Shell_ meaning you can use the standard *nix bash commands!

# If _Bash Shell_ is _not_ listed on your Windows 10 machine

On some versions of Windows 10, some extra configuration is required before Bash Shell is able to be selected within VS Code. If this is the case on your machine, follow the below troubleshooting steps before reattempting to change your shell as above.

To start, we need to make sure Developer Mode is enabled in the Update and Security section of Windows 10. Press **WIN+R** (Windows Key and R simultaneosly) to open a Run dialog. In the dialog enter **ms-settings:developers** followed by the enter key. The window shown below should appear on screen.

![Enabling Windows 10 Developer Mode](exercises/.images/developerMode.PNG)

Select the **Developer mode** radio button and **yes** on any succeeding dialog boxes. Wait for any neccessary installations to complete.

Once that has completed, we need to enable the WSL (Windows Subsystem for Linux). Press **WIN+R**, in the dialog enter **powershell** followed by the enter key. In the powershell window copy and paste the following:

```
Start-Process powershell -Verb runAs
exit
```

Press the enter key and accept the UAC (User Account Control) dialog. A new powershell window will launch with Administrator rights.

Copy and paste the following:

```
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
```

Press the enter key and wait for the process to complete. Once complete, restart your computer before continuing.

Finally, we need to install [Ubuntu from the Microsoft Store](https://www.microsoft.com/en-gb/p/ubuntu/9nblggh4msv6?activetab=pivot:overviewtab). Click the blue **Get** button and accept any dialogs to launch the Microsoft Store and begin the installation. Once Ubuntu for WSL (Windows Subsystem for Linux) has installed, restart Windows.

Once restarted, reattempt to enable Bash Shell in VS Code as per the section above.

## 1 Forking the Foundation Materials

You should start by logging in to the University GitHub server using your university username and password. Make sure you don't log into GitHub.com!
Expand All @@ -35,6 +68,8 @@ Locate the green **Clone or Download** button and click this. You will see the o

![The Clone Button](exercises/.images/clone01.png)

Make sure the url begins with `https://`, if it begins with `git` you need to click in the small **Use HTTPS** link!

Launch the **terminal** app (Mac and Linux users) or Bash Shell (Windows 10 users). Now use this to navigate to the directory where you want to store the lab materials. You should use the following bash commands:

1. `ls` is used to see the contents of the current directory.
Expand Down Expand Up @@ -64,14 +99,85 @@ If you are using Windows 10 you will need to carry out some additional steps bef

This will open a new Git Bash shell in the project directory.

## 3 Pushing the Changes to GitHub
## 3 Installing NodeJS

Next we need to install and configure NodeJS. If you are using MacOS or Linux the first task is to install the Node Version Manager tool. You can find detailed [instructions](https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/).

Once installed you may need to restart your computer. Now check it was installed correctly:

```bash
$ command -v nvm
nvm
```

Now we can install the latest version of NodeJS:

```bash
nvm install node
node -v
```

If you are running Windows 10 you need to [download the installer](https://nodejs.org/en/) for the **Current** version of NodeJS (12.10 at the time of writing).

## 4 Running a Web Server

Use the terminal to navigate to the `exercises/01_setup/` directory and try running the `index.js` script:

```shell
$ cd exercises/01_setup/
$ node index.js
Error: Cannot find module 'koa'
```

If you are using Windows 10 you will need to use the command prompt instead and navigate to the `01_setup/` directory.

Notice you get an error, we need to install the missing module using the _Node Package Manager_ tool. We can then try to run the script again:

```shell
$ npm install koa
$ node index.js
app listening on port 8080
```

Now we have the server up and running so the final task is to view the web page using the web browser. Simply open the Chrome browser and navigate to localhost:8080 where you should see a message. If this works you are ready to start the lab exercises.

## 5 Using npm and its package.json

**Have a look at your `package.json` file and understand its contents**.
- When you are starting a new _project_, **you have to create this yourself**:

1. Use the `npm init` command to create the package.json file
- You can leave all the options default, just leave them empty and keep pressing enter
- Alternatively you can run `npm init --yes`, it will simply leave everything default
2. Install the dependencies for the first time using the `-S` _switch_ with `npm install`
- e.g.: `npm install -S koa koa-bodyparser`
- This would add something like this to the `package.json` file:
```json
"dependencies": {
"koa": "^2.11.0",
"koa-bodyparser": "^4.2.1"
}
```
- When you next run `npm install -S <package>`, the given package's _newest version_ will be simply added to the list, or in case of a new version for a _previously listed_ dependency, the _version number_ will be updated
- This `-S` is just a short version of the `--save` _switch_
- **You can use the alternative `--save-dev` switch to install and save them as _development dependencies_**
- Something that you wouldn't want to deploy, but is necessary for development
- E.g. we will use `jest` for testing, and `eslint` for linting during the development phase, but these shouldn't be required to be installed during deployment
- You are done with adding the dependencies, now simply use `npm install` to install all of them at once!
- If you don't want to install development dependencies, use `npm install --production`
3. This `package.json` file is also useful to store _scripts_:
- Look at the following line: ` "start": "nodemon index.js"`
- This lets us simply type `npm start` in the terminal to start our application via _nodemon_
- Nodemon is a great tool that restarts the application every time we save a file in the given folder, so we don't actually have to manually stop and restart it after every modification.

## 6 Pushing the Changes to GitHub

As you work through the lab activities two things are likely to happen:

1. You make changes to the code that you want to push to the forked copy of your repository.
2. You will need to pull any bug fixes from the original repository.

### 3.1 Configuring the Repository
### 6.1 Configuring the Repository

Before you start interacting with the GitHub server you need to configure the local repository. Open the Bash Shell and run the following commands:

Expand All @@ -82,7 +188,9 @@ git config user.email 'doej@coventry.ac.uk'

remember to replace the values with you own name and your university email (but without the uni part).

### 3.2 Pushing Changes
### 6.2 Pushing Changes

**NOTE: You only need to carry out this step when you have make changes to the code! This will normally need to take place each time you complete a "Test Your Understanding" section.**

As you save your changes you will see a blue circle against the **Source Control** tab that indicates how many files have been changed, we need to get these changed files up to GitHub. Start by opening the tab, you will see a list of all the files you have changed.

Expand All @@ -98,9 +206,9 @@ Now you should click on the **Sync** icon (shown below) to push the new commit u

At this point you should be able to refresh your GitHub repository page to see the changes.

### 3.3 Pulling from Upstream
### 6.3 Pulling from Upstream

As changes are made to the master repository you will want to merge these into your forked repository. Before you can do this you will need to add a link to the upstream repository. Open a bash shell:
As new materials and resources are added to the original repository (and bugs fixed) you will want to merge these into your forked repository. Before you can do this you will need to add a link to the upstream repository. Open a bash shell:

```bash
git remote add upstream https://github.coventry.ac.uk/web/foundation.git
Expand All @@ -116,43 +224,3 @@ git merge upstream/master
```

Don't worry if you don't understand what is happening, this will be explained in a future lab.

## 4 Installing NodeJS

Next we need to install and configure NodeJS. If you are using MacOS or Linux the first task is to install the Node Version Manager tool. You can find detailed [instructions](https://nodesource.com/blog/installing-node-js-tutorial-using-nvm-on-mac-os-x-and-ubuntu/).

Once installed you may need to restart your computer. Now check it was installed correctly:

```bash
$ command -v nvm
nvm
```

Now we can install the latest version of NodeJS:

```bash
nvm install node
node -v
```

If you are running Windows 10 you need to [download the installer](https://nodejs.org/en/) for the **Current** version of NodeJS (12.10 at the time of writing).

## 5 Running a Web Server

Use the terminal to navigate to the `exercises/01_setup/` directory and try running the `index.js` script:

```shell
$ cd exercises/01_setup/
$ node index.js
Error: Cannot find module 'koa'
```

Notice you get an error, we need to install the missing module using the _Node Package Manager_ tool. We can then try to run the script again:

```shell
$ npm install koa
$ node index.js
app listening on port 8080
```

Now we have the server up and running so the final task is to view the web page using the web browser. Simply open the Chrome browser and navigate to localhost:8080 where you should see a message. If this works you are ready to start the lab exercises.
Loading