Categories


Authors

Serves you right

We are writing servers in Node JS. It's cool for writing something simple like the Game of Life. 

Then you meet Express! And everything changes. The current workshop is to make an app that behaves like Twitter. Express makes it so much easier to do. 

It uses Node JS functions to do the heavy lifting and greatly simplifies the code we have to write to serve up pages when a client makes a request. 

A client in this case is anything/anyone that makes a request to our server. It can be a person initiating the request on a computer/phone/pager(?) or a microcontroller (like Arduino), sensor, or fridge(?). 

With Express, we can route site traffic intelligently and use page templates to dynamically serve pages. With Morgan we can set up middleware to handle incidentals like geolocating site visitors by capturing their IP addresses and logging requests to see how visitors interact with our site. 

Add a little Swig ( a templating engine) and we reduced the size of required code down to the most important parts - the ones that change. Swig helps us compile and dynamically render pages with templates that can take logic based on the data or conditions that the page is requested. 

Already, I can host a site on my computer and have my classmates access it while on the same wifi. We learn SQL later today. Pretty soon, I imagine myself loading something on Heroku and watching it become more than I dreamed. This is all such exciting stuff. What an awesome place to learn! 

SQL

Low Energy