- cd /path/to/your/project
- mkdir data
- mongod --dbpath /path/to/your/project
- A bunch of text should appear, you will see "I NETWORK [initandlisten]" alot;
- type "mongo" and press enter
- MongoDB shell version: your-mongo-version connecting to: test should be appear in your console. If not, repeat from step 1
- Still in mongo console, type "use your-db-name"
- You should see "switched to db your-db-name"
- Now you can put 'mongodb://localhost/node_api' in your connection settings
credits : original procedure can be seen at https://disqus.com/by/JosephBeuysMum/ comments on https://scotch.io/tutorials/build-a-restful-api-using-node-and-express-4 to create mongo database on my project folder. I just do some little adjustment.