It might be a simple but unable to crack it. started learning node.js. i want to use password-manager.js file in test.js. how can i do this.
**
My Directory structure:-
root
-home
- node-basics
- node-password
- password-manager.js
-node-mongo-connection
-test.js
**
//In password-manager.js
module.exports = function(){
//code.......
}
//I tried to module.exports
// test.js
var pm = require('/../../password-manager.js');
//but not sure doing it correctly or its a correct method or not.
require('../node-password/password-manager')