const filepath = require(file) code example Example: How to get the path to the file that required your module? module.parent