server-side development Flashcards
what does node.js do
runs js on the server side
what are http methods
textual commands passed via http protocols between the client and the browser
GET
requesting/retrieving content
POST
sending data and retrieving content
what is a web server
software that runs on the server or cloud infrastructure
what does the web server do
handles http requests
listens for tcp connection requests from clients
what is a port
communication endpoints for a host on a network using tcp
how many processes can be assigned to a port at once
1
how many well known ports are there
1023
what is the software loopback ip
127.0.0.1
what are endpoints in node
code intended to receive a request from a client
how can endpoints in node be distinguished
via the url and the http method
node routes
the connection of the http request to the endpoint
response object
what you send back to the client
request object
what came in from the client/browser
an object is created to encapsulate this information
what is AJAX and what does it do
asynchronous javascript and xml
allows content to be updated after loading a page without intervention from the user which allows for dynamic pages
how does AJAX work
after the page has loaded we use js at the client side to query the server
the server responds with content which is processed by js and if we need to the page is updated without being reloaded
why dont we need html in ajax
we dont need to render the page
what is axois
a http client library that runs in browser and on node.js that simplifies querying a web service in js
how do we handle errors in axios
promises; then and catch
what does express do
simplifies handling http requests in js/node.js
+ url encoded parameters
the simplest way of passing data
how do we pass multiple parameters in url encoded parameters
separating them with &
res.end (express)
ends the response ; nothing else should follow it