Luis’ coding experiments
What does Express do for us? Why are we using it?
Let’s visit the website for Express.
It explains that Express is a fast, unopionated minimalist web framework. Fast is obvious. Unopinionated is coder-speak for: “you can write code any which way you please. There isn’t a single way you have to write it if you use our library with it.” Okay, but what is a web framework?
Express provides a simple way (a mini “language”) to serve pages. It is like a switchboard operator that receives a call (“Hello, I’d like to speak to lee in Henley-4562”). What are we routing? When a user requests a particular webpage, that gets routed via our code, and specific content (“a view”) is served.
How does this work? Express looks for the route specified in the URL bar.
the Route looks like a sub-folder, but it’s actually a bit of information that is communicated. Express takes this info, and then figures out what to display.
In our Haunted House Express app,
Node.js to manage the server.
Express to handle the routes.
Socket.io for sending messages.
CoolChat starter code
When you click package.json you have the ability to install additional npm packages. By clicking Add Package, you may access any package from the NPM registry.