Friday, 27 January 2017

Introduction to Node.js and Express

After creating the browser window drawing application I conducted research to inform the team about Node.js and Express for Node.js. These are the technologies that we will use to create a web API that allows our browser, server and database to communicate with each other through requests and responses. I was only able to conduct a small amount of research. I will be conducting more in the future on the topic of databases and the transferring of images. No failures other than not doing as much research as I would have liked. The notes I took are introductory, I chose not to include actual code in my notes because the helpful code is within the links I provided.

This is a short document of important points and educational resources.

Node.js


  • JavaScript-based framework for building event-oriented servers
  • a platform that allows JavaScript to be used outside the Web Browsers
  • create the server and server-side code for an application like most of the other web languages but using JavaScript
  • built on Google Chrome's JavaScript Engine
  • All APIs of Node.js library are asynchronous, that is, non-blocking. It essentially means a Node.js based server never waits for an API to return data. The server moves to the next API after calling it and a notification mechanism of Events of Node.js helps the server to get a response from the previous API call.
Helpful Text


Video Example


API / Web API


Helpful Text


Video about API


Express JS


  • Express is a minimal and flexible Node.js web application framework.
  • You can install it with Node Package Manager. [ $ npm install express] use @ to install a specific version
  • Creating a robust API is quick and easy
  • Allows to dynamically render HTML Pages based on passing arguments to templates.
  • set up middlewares to respond to HTTP Requests.
  • Defines a routing table which is used to perform different actions based on HTTP Method and URL.
  • Routing refers to determining how an application responds to a client request to a particular endpoint, which is a URI (or path) and a specific HTTP request method (GET, POST, and so on).
  • Request Object − The request object represents the HTTP request and has properties for the request query string, parameters, body, HTTP headers, and so on.
  • Response Object − The response object represents the HTTP response that an Express app sends when it gets an HTTP request.
  • Express uses GET and POST methods
Helpful text


Video (introduction to express)









No comments:

Post a Comment