Reputation: 2465
My apologies if this has been asked before but I haven't been able to find the answer.
I have a small project written in express.js (node.js) that uses a local sqlite data file. I want to switch to mongodb but would like to keep the data file within the project directory. Is that possible with mongodb and, if so, can anyone offer any guidance?
Thank you,
Luis
Upvotes: 1
Views: 114
Reputation: 3826
It's certainly possible. In your mongod.conf
file, simply point the dbpath property at whatever directory you'd like
dbpath = /path/to/your/project
Keep in mind that unlike sqlite, MongoDB creates a number of files. And that number changes as your data changes.
Upvotes: 1