Skip to content
 
 

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chapter 1 Lab - Task 1: Static Websites

In this task, you will get a demonstration of a static website in which a web server delivers static web content without server-side programming. You will also explore different dev tools of the browser.

Project Preparation

  1. Clone or download the code from the following GitHub repo: https://github.com/houcine1amraoui/task1-a-static-website-demo
  2. Open the project folder with VS Code and then open the integrated terminal.
  3. In the terminal, run “npm install” command to install the dependencies (express in this case).
  4. In the terminal, run “node server.js” command to start the server.

Questions

  1. Browse to http://localhost:1000
  2. Inspect the source code of the website using the dev tools of the browser. What makes the button click show the hidden text?
  3. Check out the source code of the website from the code base using the text editor. Where the html pages resides and how the server serves them?
  4. Check out the response status code using the network tool in the browser when the page loads for the first time and in the second. What have you noticed? Why is that?
  5. Create another static web page called “test.html”, put some web content in it, then add a route to deliver it.
  6. Restart the server and navigate to the “test” page.
  7. Now, go to the project folder via Windows explorer an open index.html file directly through the browser. Why the web page has been displayed normally without running the server? What protocol has been used in such a case?
  8. Explore and navigate through the website using Postman API client.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages