Always start Mongodb

Asked

Viewed 121 times

2

Whenever I will use Mongodb in a local development environment, I have to open the terminal and type:

mongod

So you can use Mongodb’s services.

Since my operating system is Windows10 (64 bit), how do I always start this process automatically, without having to keep a terminal open only to run the mongod?

In this context, if I want to disable this automatic startup, as would the procedure?

1 answer

2


You can set mongoDB as a service, to be booted together with Windows.

mongod --dbpath "{{seu_diretorio_do_mongo}}" --logpath "{{seu_diretorio_do_mongo}}\logs.txt" --install --serviceName "MongoDB"

Then, on the windows service screen, you can set the service to automatic startup.

Question in English for reference

Documentation link

Browser other questions tagged

You are not signed in. Login or sign up in order to post.