@@ -12,17 +12,49 @@ Each ToDo task has two properties:
1212
1313## Installation
1414
15- To view the website, open ` index.html ` with Live Server in VS Code.
15+ Run the following command in this directory to install all required dependencies:
16+ ```
17+ npm install
18+ ```
19+ > This will install
20+ - ` jest ` - for running unix test
21+ - ` http-server ` - for serving ` index.html ` over HTTP
22+
23+ ** Note:** If you are using a Windows CLI, replace ` package.json ` by ` package.json-windows ` .
24+
25+ ## Running the App
26+
27+ Since the app uses ** ES modules** , the HTML file ** must be loaded via HTTP/HTTPS** rather than
28+ directly from the file system.
29+
30+ Make sure you run the server in this directory where ` index.html ` is located.
31+
32+ Two possible ways to serve ` index.html ` over HTTP:
33+
34+ #### Option 1: ` http-server `
35+
36+ 1 . Run
37+ ```
38+ npm run serve
39+ ```
40+ > Here, ` serve ` is a shortcut defined in ` package.json ` for running ` http-server ` .
41+
42+
43+ 2 . Open one of the URLs shown in the terminal (e.g., ` http://127.0.0.1:8080 ` ).
44+
45+
46+ #### Option 2: Open ` index.html ` with Live Server in VSCode.
1647
17- ** Note** : The app is loaded ** as ES modules** in the HTML file, and as such, the HTML file must be accessed via the HTTP or HTTPS protocol.
1848
1949## Understanding how the code is organized as ES modules
2050
2151- [ What is ES Modules?] ( 00-what_is_ES_modules.md )
2252- [ How to use ES modules with Node.js and Jest?] ( 01-using_esm_with_nodejs_and_jest.md )
2353- [ A guide to modularize a web app] ( 02-guide_to_modularize_code.md )
2454
25- ## Instructions
55+ ---
56+
57+ ## Exercise Instructions
2658
2759In this exercise, your objective is to extend the ToDo app by implementing new features.
2860Start with the main feature and then try the stretch goals if you have extra time.
0 commit comments