__dirname go back one directory
snippet in javascript

__dirname go back one directory

user597

let reqPath = path.join(__dirname, '../');//It goes 1 folders or directories back from given __dirname.