Install MongoDB on Windows
NOTE: we recommend to use WSL 2 Ubuntu instead and do sudo apt install mongodb
Install under c:\mongo
path:
In admin cmd
:
mkdir c:\mongo\data\db
c:\mongo\bin\mongod.exe --install --logpath c:\mongo\logs --logappend --bind_ip 127.0.0.1 --dbpath c:\mongo\data\db --directoryperdb
net start mongodb
Start client:
c:\mongo\bin\mongo.exe
Create database and collection
> use db-name
> db.createCollection('collaction name')