Tech World Software School
techworldss.bsky.social
Tech World Software School
@techworldss.bsky.social
Learn how to create an HTTP server with the Express library using the JavaScript programming language on the serverside, also known as Nodejs.
January 19, 2025 at 7:38 PM
Somebody has a question about NPM not being recognized. Make sure to install Node from the website nodejs dot org. It usually comes bundled with the NPM command as well.

Somebody else asks how to verify the library express was actually installed.
January 18, 2025 at 7:08 PM
The lecture shows you how to install the express package from the Node Package Manager (NPM) registry.

You learn that third-party packages are installed in a directory called node_modules. Dependencies are specified in the manifest file called package followed by the extension json.
January 18, 2025 at 7:07 PM
The lecture gives a brief overview of what Nodejs is.

Then you get introduced to the Express library.

After that, you learn how to generate an NPM project with the creation of a package dot json file.
January 18, 2025 at 7:07 PM
The lecture also briefly shows how to send back a JSON response to the client.
January 16, 2025 at 2:43 PM
You also learn how to send back HTML to the client.

You learn how to change the status code of the response.

The lesson also shows how to use the static files middleware so you don't have to manually define a route for every asset file that you might have.
January 16, 2025 at 2:43 PM
You learn how to define endpoint routes and their handler functions.

You get exposed to the browser developer tools (DevTools) to monitor network requests so you can understand the request-response from the HTTP GET request made to the web server.
January 16, 2025 at 2:43 PM
Learn how to build an HTTP web server in the Nodejs (Serverside Javascript) programming language with the ExpressJS library.

The lesson goes over generating an NPM project and installing express.

Then, you learn how to code a basic server running at a specific port on localhost.
January 16, 2025 at 2:43 PM
Every time you click the next button, the current image index increments. However, it goes beyond the number of elements in the array of image URLs. So we have to reset that index back to 0 when you are seeing the last image and click next.
January 15, 2025 at 3:35 PM
Learn how to use the remainder operator (percent sign, aka modulo) to go from the last image to the first image.
January 15, 2025 at 3:35 PM
What other problems are you going to solve?
January 7, 2025 at 6:57 PM
Yes, for security :)
January 7, 2025 at 2:46 PM
In order to remember what image the user is seeing, you have to store its index in a variable. Then, every time you click the next button, that index is incremented and eventually you see the next image in the list.
January 7, 2025 at 2:26 PM
In order to allow for multiple images to be browsed through as you click the next button, you have to know which image URL to use to display the image. Since the URLs are held in an array, you can take the next element every time you click next.
January 7, 2025 at 2:26 PM
Learn how to keep track of the current image index using a JavaScript variable.
January 7, 2025 at 2:26 PM