I'm trying to understand the internal structure of Node.js. To my understanding V8 runs the JavaScript(EcmaScript) which makes sense. Since all the Node.js Api is not JavaScript but looks like JavaScript, My question is, what runs the Node.js Api. For example what runs
http.createServer();
Or
fs.readFile();
All of Node.js API is JavaScript.
Only the I/O operations are delegated to the libuv
library which is written entirely in C. Stuff like fs.readFile is just wrappers around libuv functions, the so called POSIX API.