Closed arranf closed 5 years ago
This will soon be handled via PR https://github.com/feathers-plus/generator-feathers-plus/pull/233 .
People have settled on posting issues in f+/generator-feathers-plus rather than f+/cli so please post any followup comments there. Thanks.
Hey Eddy. Great news! It might be good to mark that in the repo somewhere.
Arran
On Wed, 27 Feb 2019, at 12:56 PM, Eddyystop wrote:
Closed #31 https://github.com/feathers-plus/cli/issues/31.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/feathers-plus/cli/issues/31#event-2167889293, or mute the thread https://github.com/notifications/unsubscribe-auth/AITM9luuwH092-u77KJb3RZJ8FI6_xd0ks5vRoB_gaJpZM4bT7n4.
The MongoDB promise is in app.get('mongoClient')
, so the way people handled this was by adding await app.get('mongoClient')
in src/index.js at // !code: listening // !end
.
This PR is to generalize that so other services and custom code can use the same scaffolding.
Resolved with PR https://github.com/feathers-plus/generator-feathers-plus/pull/249 .
This inserts app.get('mongoClient')
and app.get('sequelizeClient')
in src/index.js
. We did not go with PR https://github.com/feathers-plus/generator-feathers-plus/pull/233 as we did not want to add cognative load.
Published as f+/cli v0.8.8 which uses generator v0.8.8
Steps to reproduce
Expected behavior
The data is seeded Tell us what should happen
Actual behavior
Data fails to seed. The MongoDB connection is not guaranteed to be active when the call to seed-data occurs causing feathers-mongodb to fail to perform any service calls.
This is fixed by using setTimeout() with a reasonable (~2-3 second) timeout.
System configuration
Module versions (especially the part that's not working):
MongoDB Version: 4.0.6
NodeJS version: 10
Operating System Ubuntu