Frontend and backend
The frontend is what runs in the browser (the interface). The backend is the program that runs on a server: it stores the data, applies the business logic and responds to the frontend's requests.
With Node.js you can write that server in JavaScript, the same language as the frontend. That's why "full-stack JS".
HTTP: request and response
Client and server talk over HTTP. The client sends a request and the server returns a response.
A request has:
- a method:
GET(read),POST(create),PUT(update),DELETE(delete). - a route:
/users,/products/5. - optionally a body with data (in POST/PUT).
A response has:
- a status code:
200(OK),201(created),404(not found),400(bad request). - a body with the data (usually JSON).