process.cwd()
returns the current working directory,
i.e. the directory from which you invoked the node
command.
__dirname
returns the directory name of the directory containing the JavaScript source code file
More Related Contents:
- Unable to get output after passing functions in node js program? [closed]
- How to fix npm throwing error without sudo
- In what scope are module variables stored in node.js?
- Is there a way to make npm install (the command) to work behind proxy?
- How to edit a node module installed via npm?
- How can I set cookie in node js using express framework?
- Timeout in async/await
- Setting expiry time for a collection in mongodb using mongoose
- Node error: SyntaxError: Unexpected token import
- HAProxy + WebSocket Disconnection
- chai test array equality doesn’t work as expected
- Create a HOC (higher order component) for authentication in Next.js
- Is there any way to configure multiple registries in a single npmrc file
- SyntaxError: Use of const in strict mode?
- How to fix npm vulnerabilities manually?
- How to open a create-react-app from another computer connected to the same network?
- Package cairo was not found in the pkg-config search path. Node j.s install canvas issue
- Catch all uncaughtException for Node js app
- Why is ‘type: module’ in package.json file?
- How to resolve Node.js: “Error: ENOENT: no such file or directory”
- Nodemon Error: “System limit for number of file watchers reached”
- How to create full path with node’s fs.mkdirSync?
- How to get console.log line numbers shown in Nodejs?
- ISODate is not defined
- Cloud Functions for Firebase – Converting PDF to image
- Difference between `npm start` & `node app.js`, when starting app?
- NPM cannot install dependencies – Attempt to unlock something which hasn’t been locked
- React + Material-UI – Warning: Prop className did not match
- How can I execute a node.js module as a child process of a node.js program?
- How to get SCSS variables into react