How can I get the application base path from a module in Node.js?

The approach of using __dirname is the most reliable one. It will always give you correct directory. You do not have to worry about ../../ in Windows environment as path.join() will take care of that. There is an alternative solution though. You can use process.cwd() which returns the current working directory of the process. That … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)