Cloud Services
AWS
Azure
Google Cloud
Salesforce
Microsoft
SAP
February 2, 2024
Example:
const { dirname } = require('path');
const appDir = dirname(require.main.filename);
console.log(appDir)
Example:
const appRoot = require('app-root-path');
console.log(JSON.stringify(appRoot))
OUTPUT:-
{"path":"C:\\Users\\admin\\Desktop\\nodejs"}
Work with our skilled Node developers to accelerate your project and boost its performance.
Hire Node.js Developers