One common thing for a database driven project is the run mongodb and your project inside Docker (see installing here). In the situation this will be two files, one Dockerfile and one docker-compose.yml. This gives you portability for the database (meaning it's not just installed locally), and replicates what you might deploy to a service like railway, heroku, etc.
One common thing for a database driven project is the run
mongodb
and your project inside Docker (see installing here). In the situation this will be two files, oneDockerfile
and onedocker-compose.yml
. This gives you portability for the database (meaning it's not just installed locally), and replicates what you might deploy to a service like railway, heroku, etc.A simple
Dockerfile
would be something like:And a
docker-compose.yml
something like this:Note, this is just an example from memory and not tested, so it may not work right off the bat. Let's chat if you want to learn more about Docker!