From d07240fbac591c3253dbdb36377484ce40cac93e Mon Sep 17 00:00:00 2001 From: Memas Deligeorgakis Date: Fri, 18 Oct 2019 23:15:54 +0200 Subject: [PATCH] :books: Updated readme me to instruct to create Mongo db directory under the Mac OS Document use of the home directory on macOS 10.15 and above Thanks to @memasdeligeorgakis --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7ac8d3d..146e01d 100644 --- a/README.md +++ b/README.md @@ -51,10 +51,18 @@ npm install sudo mkdir -p /data/db # give the db correct read/write permissions sudo chmod 777 /data/db + +# starting from macOS 10.15 even the admin cannot create directory at root +# so lets create the db diretory under the home directory. +mkdir -p ~/data/db +# user account has automatically read and write permissions for ~/data/db. ``` - Start your mongoDB server (you'll probably want another command prompt) -``` +```bash mongod + +# on macOS 10.15 or above the db directory is under home directory +mongod --dbpath ~/data/db ``` - Build and run the project ```