var exec = require('child_process').exec;
exec('pwd', function callback(error, stdout, stderr) {
// result
});
More Related Contents:
- node.js execute system command synchronously
- Using nodejs’s spawn causes “unknown option — ” and “[Error: spawn ENOENT]” errors
- Stop node.js program from command line
- What is the –save option for npm install?
- How to exit in Node.js
- Firebase functions: cannot read property ‘user_id’ of undefined
- Cannot overwrite model once compiled Mongoose
- Getting the user id from a Firestore Trigger in Cloud Functions for Firebase?
- Specify path to node_modules in package.json
- In mocha testing while calling asynchronous function how to avoid the timeout Error: timeout of 2000ms exceeded
- Mongoose duplicate key error with upsert
- req.locals vs. res.locals vs. res.data vs. req.data vs. app.locals in Express middleware
- Node.js – Find home directory in platform agnostic way
- How to create global variables accessible in all views using Express / Node.JS?
- Change node_modules location
- npm ERR! Error: connect ECONNREFUSED when trying to update the npm
- What is the recommended way to install Node.js, nvm and npm on MacOS X?
- Node.js Event loop
- fs.writeFile in a promise, asynchronous-synchronous stuff
- Get all files recursively in directories NodejS
- DeprecationWarning: Buffer() is deprecated due to security and usability issues when I move my script to another server
- Node.js, can’t open files. Error: ENOENT, stat ‘./path/to/file’
- MomentJS getting JavaScript Date in UTC
- how to use async await with https post request
- How to wait for a child process to finish in Node.js
- Unable to Change Favicon with Express.js
- npm install that requires node-gyp fails on Windows
- Mongoose overwrite the document rather that `$set` fields
- Firebase realtime database transaction handler gets called twice most of the time
- How to access Google Chrome’s IndexedDB/LevelDB files?