Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
80
rated 0 times [  83] [ 3]  / answers: 1 / hits: 65663  / 11 Years ago, thu, february 6, 2014, 12:00:00

I have mail configuration code in all.js.



Now i am trying to import this in my mail.js service, so i imported the config module as follows :-



mail.js



config = require('config'),


all.js



mailer: {
auth: {
user: XXXXXXX,
pass: abc@123
}
}


enter



Gives me error cannot find module, but the module exists i have checked it.



How to solve this?


More From » node.js

 Answers
10

I used the following code & it worked :-



config = require('../config/config');

[#72689] Wednesday, February 5, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jayden

Total Points: 108
Total Questions: 109
Total Answers: 107

Location: Kenya
Member since Mon, Jun 14, 2021
3 Years ago
;