Learn how to create an HTTP server with the Express library using the JavaScript programming language on the serverside, also known as Nodejs.
Posts by Tech World Software School
Run HTTP Server with ExpressJS
#expressjs
https://www.youtube.com/watch?v=bh3K__DJU3Y
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.
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.
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.
Generate NPM Project and Install ExpressJS
#expressjs
https://www.youtube.com/watch?v=UPwNPmRQK4M
Join us to practice Leetcode problems together:
www.eventbrite.com/e/practice-s...
#LiveCoding #LearnToCode #100DaysOfCode #LeetcodeProblems #Algorithms #DataStructures #DSA #TechInterview
Join us to practice some #Leetcode today:
www.facebook.com/share/15qKrR...
#LearnToCode #100DaysOfCode #DSA #DataStructures #Algorithms #JobInterviewPrep #TechInterview
The lecture also briefly shows how to send back a JSON response to the client.
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.
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.
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.
Introduction to Express.js - Software School (2024-03-14)
#expressjs
https://www.youtube.com/watch?v=4q5YxJGe284
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.
Learn how to use the remainder operator (percent sign, aka modulo) to go from the last image to the first image.
Cycling Through Images using the JavaScript Remainder Operator
#javascript
https://www.youtube.com/watch?v=z3z8ZzJY0oM
What other problems are you going to solve?
Yes, for security :)
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.
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.
Learn how to keep track of the current image index using a JavaScript variable.
Keeping Track of Current Image Index with a JavaScript Variable
#javascript
https://www.youtube.com/watch?v=knSvpGpAGGU
What are you building?
Do you like cryptography?
What programming language do you use?
Congratulations!
Are you going to use it?