E
E
Eugene2019-04-20 21:40:54
Node.js
Eugene, 2019-04-20 21:40:54

How to get the path to the file from which the module was called?

I have a file that, when called in another file, should log which file it was called by.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stockholm Syndrome, 2019-04-20
@StockholmSyndrome

module.filename

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question