F
F
fh2017-10-20 22:07:23
JavaScript
fh, 2017-10-20 22:07:23

Paths in node.js. How to import a module that is two folders up in the directory?

59ea47ed9d35c593998282.png
What path should be written in API.js to import the knowledges module in the models folder (see screenshot)? tried to write '@/../models/knowledges' , '/models/knowledges'. But nothing works, although in the same Vue (in components) the first method would work. I don't really understand how it works. Explain, please. var Knowledges = require('/models/knowledges')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Negwereth, 2017-10-20
@ramazan793

../../

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question