Difference between ./ and ../ in require Node.js


I have a require ./../app and I do not understand what it means, since from what I understand ./ implies in the current directory and ../ a directory above, with which I do not understand what they mean together. Thanks!

asked by pedro 03.10.2018 в 22:26

1 answer


Well as you said it ./ means current directory and ../ upload a directory.

Using ./../ does not make any sense because you're telling it to go to the current directory and then upload one, when you can directly do ../

That is, if I in my terminal I am in /home/usuario/docs and I execute cd ./../ the result would be /home/usuarios/ , which comes to do the same as doing cd ../

I hope I have resolved the doubt !!!

Greetings !!!

answered by 03.10.2018 в 22:40