Reputation: 1104
I just installed MongoDB. Instead of writing annoying cd
to mongod.exe
every time I want to run MongoDB, I want this file to be available as a global command, so that it runs regardless of the directory I'm in, like node
or npm
or git
. How do I accomplish this for VS Code terminal?
Upvotes: 0
Views: 384
Reputation: 11672
There are different approaches to start mongod.exe
:
You could add mongod.exe
to your system's PATH variable (like git
, npm
etc.)
You could create a script (for example a .bat
) file in your workspace directory, that contains
Start "path/to/mongod.exe"
If you want to start the mongod.exe
via a vscode command like Strg + P for the user settings, you need to write an extension and register a command.
Upvotes: 1