This is a very clumsy work path

So let me get this straight. We open a terminal window, run through a bunch of commands, and the system pretty much hangs, waiting, because we have not set the port at 30000. To do so, we have to open a DIFFERENT window, somehow go through the process again (it’s not clear, the presenter zipped straight into the new commands without clarifying the setup), run through a bunch of commands that (don’t actually) reset the port to 30000, and then shut DOWN the original window from the second window? Do I have this right?

What kind of weird workflow is this? Open a window, open another window, set parameters from the second window, close the first window?

Why not just write your code so that you can set a port from within the first window? This is the first time I ever saw a command line interface that didn’t let me set a basic configuration like port directly from the CLI.

Hey @Sarah_39095

I am not really sure what video you are reffering to, however, from what you have stated I am thinking that the instructor started a mongod daemon process without --fork. This will run mongod in the current terminal window. It is not hanging so to speak it is just not running in the background. That is why the instructor will open another terminal to access the mongo shell which interacts with the daemon process started in the other terminal.

If you continue with the course you will see that this is not a production way to set things up. However this is a learning environment and they are just trying to demonstrate how everything works.

This is the instructor setting up the mongod the daemon process.
See these docs for more info on the daemon process.
https://docs.mongodb.com/manual/reference/program/mongod/#mongod

So this part is not correct. It is because --fork is not used.

This is him opening another terminal to access the mongo shell.

This is because we do not need to reset the port

Yep we can shut down the daemon process from our access to mongo shell

Here are the list of database commands we can run. https://docs.mongodb.com/manual/reference/command/index.html#database-commands

If you have anymore question feel free to ask. Im glad to help