I'm trying to follow Getting started with LoopBack but instead of connecting to MySql instance I'm trying to connect to MongoDB instance running on localhost (default port 27017).
While following the steps I'm executing node . as given at Connect your API to a data source This is giving me following error and then node is stopping.
D:\TestLoopBack\node_modules\loopback-connector-mongodb\node_modules\mongodb\lib\utils.js:98
process.nextTick(function() { throw err; }); ^ ValidationError: The `CoffeeShop` instance is not valid.Details:
Namecan't be blank (value: undefined).,ValidationError: TheCoffeeShopinstance is not valid. Details:Namecan't be blank (value: undefined).,ValidationError: TheCoffeeShopinstance is not valid. Details:Namecan't be blank (value: undefined).
Can someone help me understand what is this error and how can I resolve it?
My datasources.json file has:
{ "db": { "name": "db", "connector": "memory" }, "mongoDs": { "name": "mongoDs", "connector": "mongodb", "host": "localhost", "port": 27017, "database": "TestLoopBackDB" } }
I've not set any authentication on MongoDB so no username / password specified.