rest-hapi
rest-hapi copied to clipboard
MongoError: password cannot be empty
Describe the bug
Since I am am not running mongodb locally, I have created a db on my mlab account and am trying to seed it via the ./node_modules/.bin/rest-hapi-cli seed <my mlab db URI>
command. Collections are created successfully, but data is not seeded, as there is an error.
To Reproduce Steps to reproduce the behavior:
- Create an mlab account, create a test database and database user. Obtain the URI to access it.
- Clone the test repo as per the quickstart
- Try seeding the mlab database using the URI obtains in (1)
- See error
Expected behavior Mlab database would be created and collections would be seeded
Actual Behavior The follow error occurs: "MongoError: password cannot be empty"
Desktop (please complete the following information):
- OS: Windows 7 x64
- terminal
@gpicazo I tried creating a new mlab db and was unable to replicate your issue. However I'm using macOS instead of windows so that could be the issue.
Have you tried starting your server and testing the endpoints through the swagger UI? If all is working you should be able to create a user manually.
@gpicazo did you ever figure this out? I'm having the same issue with an mlab account.
Edit: I'm dumb my URI was actually missing the password.