What I know is these two variables
__dirname: the directory where the line of code is located.
But what if I want to get the superior directory?
I did not find the relevant method after searching, what I think now is to process the path string obtained by __dirname, according to
\Perform segmentation or regularization processing
var path = require('path') path.resolve(__dirname, '..')