Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding products in database causing issue. #4

Open
ghost opened this issue Oct 8, 2016 · 0 comments
Open

Adding products in database causing issue. #4

ghost opened this issue Oct 8, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Oct 8, 2016

When I add a new document to the Products collection, it causes this problem in execution

untitled

I found that's about the chunkSize variable in the shopping/routes/index.js file, that variable must contain exactly the number of products saved in the database, so to keep my app executable, I must manually change the value of chunkSize and every single n equal to that variable (also equal to number of documents in Products collection) after insertion of new product(s), or I can count the number of the docs in that collection with a mongoDB count methods, but this issue is also related to pagination which is not covered in the tutorial, so basically, if I solved the issue of the execution error, I will have another problem, for example if I have 1000 products in the database, they will be shown in a single page, which is inconvenient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants