I have been thinking about watching Nodej source, toss off a bit, but overall not add up, do not look for too long and forget. I determined to see a little every day, specially recorded here, as to force their own power.
2019/09/22 a source code compilation
Before the computer on the next source, the source directory shots:
Compiled by the compiler command: make -j4
Try to modify the source code files: lib / http.js, add a line of code to print:
After that, the compiler make -j4, the first compilation will take some time, after compilation will be much faster. After compilation, generate out / Release directory in the current directory.
Take a look at the modified code is not valid:
cd out/Release
./node
require('http')
We can see a print out of the required http haha, modified successfully.