Digital Marketing

MongoDB Shell Editor Mode

Run the .editor command within the MongoDB Shell to open the editor and manage comprehensive multiline functions:

Run the following command within the MongoDB Shell:

.editor

The MongoDB Shell enters editor mode:

// Entering editor mode (^D to finish, ^C to cancel)
const { Writable } = require('stream');
const myWritable = new Writable({
write(chunk, encoding, callback) {
// ...
},
writev(chunks, callback) {
// ...
}
});
  • Press Cmd/Ctrl + d to finish and run your function.
  • Press Cmd/Ctrl + c to cancel and exit without running your function.

When you close the editor, the MongoDB Shell does not save any functions you had entered into the editor.


Comments

Popular posts from this blog

PowerMTA sample virtual PMTA config file

How to solve: "ERROR: Maven JVM terminated unexpectedly with exit code 137"