NodeJS is javascript runtime environment;
data coming in the form request is actually a stream of data.
The request that node receives is in the form of chunks e.g., Request Body Part1, Request Body Part2, Request Body Part3 .... Fully Parsed. So that we don't have to wait for the full request to be parsed and we could start working on the chunks independently. Also node doesn't know in advance how complex and big the request is. But we can't arbitrarily try working on those chunks that is why to organise this we use Buffer. A Buffer is like a bus stop. Buses are always driving but they do stop to pass and receive the passengers. A Buffer allows you to hold multiple chunks and work with them before they are released once you're done.
- We can use NodeJS to write Server Side Code
- We use NodeJS for Business Logic like Handling Requests, Validate inputs, Connect to Database.