Web servers Vs Node.js
Web Servers: returns files in response to HTTP requests from clients
Node.js: Runs JavaScript on the server side, allowing for dynamic responses to HTTP requests
Node.js Ports
-Ports are communication endpoints for a host on a network (using TCP)
-Only one process can bind to a port at once (e.g. only one web server can listen on port 80)
-Port numbers range from 0-65535 (0-1023 are well known and have well-defined uses)
Node.js Endpoints
-An endpoint is the part of your code that receives and processes a request
-We usually have multiple endpoints (differentiated by URL path and http method)
Node.js Routes
Routing is the connection of incoming HTTP requests (from clients) to endpoints (handling of request). Express helps with this
Node.js Request/Response Objects
With web services, there are requests and responses. They are generated when a connection is received from a client. Like an event driven UI, wait for connection and send requests/responses
AJAX (Asynchronous JavaScript And XML)
Before AJAX, web pages were static. A technique that allows content to be updated after loading a page. Generally use JSON instead of XML now for exchanging encoded data. Implemented in the client side JS to query the server.
Axois
HTTP client library that simplifies querying a web service in JS. Can configure requests such as timeout.
NOT FINISHED