user3569641
user3569641

Reputation: 922

Running mongodb in production

I am currently building a web app using express.js and mongodb. My problem is I do not know how to run mongodb itself in production. Because in the development, I used mongod command, but it need the terminal to be open so mongodb will run. How can I do this in the real server? In my express app, I just use pm2 to run it.

Upvotes: 1

Views: 630

Answers (1)

DevAlien
DevAlien

Reputation: 2476

Since you are not an expert on managing this, I would suggest you to use some mongodb-as-a-service, so that they manage that for you and you just simply access it. for example: https://mongolab.com/

Or you can use https://www.mongodb.com/cloud so that you can just lunch a few commands in your server and mongodb+backup will be installed in your server and you can update, or make clusters simply using their interface.

Or if you want to install it in your server, guessing you are using linux, and probably an ubuntu based distro you can run mongod like @aiobe suggested: sudo service mongod start

Upvotes: 2

Related Questions