node-react-aws-dynamodb-boilerplate
node-react-aws-dynamodb-boilerplate copied to clipboard
Run into Mongoose error while implementing on windows 10.
Hi Keith,
I know you developed this boilerplate code on Mac OS. However, do you have any clue why I have following error when I trying to install? Is it because of path letter difference between '/' vs ''?
......\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\connection.js:428
throw new MongooseError('The uri parameter to openUri() must be a ' +
^
MongooseError: The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect() or mongoose.createConnection() is a string.
at new MongooseError (c:\src\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\error\mongooseError.js:13:11)
at NativeConnection.Connection.openUri (c:\src\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\connection.js:428:11)
at Mongoose.connect (c:\src\node-react-aws-dynamodb-boilerplate\node_modules\mongoose\lib\index.js:262:15)
at Object.
@gusdoe Looks like the boilerplate expects a db_dev or db to be configured in the config.js.
server.js:
// Set up Mongoose
mongoose.connect(isDev ? config.db_dev : config.db);
Would be nice to include some placeholders there.