Answer the question
In order to leave comments, you need to log in
How to start mongodb and server automatically?
There is a package.json in it there is such a script
"scripts": {
"start": "node nodeapi/server.js"
}
Answer the question
In order to leave comments, you need to log in
MongoDB is a separate service and is not connected to the npm ecosystem, it runs in different ways and even makes separate servers for databases, for example, we run it through doker. The easiest way is to run it manually through the console and keep it forever live.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question