I
I
Ilia Soloveychik2019-05-04 08:01:05
JavaScript
Ilia Soloveychik, 2019-05-04 08:01:05

How to correctly display data from MongoDB through Mongoose?

I am doing localization in my application, I have a database in the application with language constants.
The bottom line is that there is a connection to the database (index.js, line 91) - and all the contents of the collection should be displayed. But firstly, for some reason it is not always displayed (that is, randomly, yes / no), and secondly, when it is displayed, I can output all the contents of the database to the console, but specifically refer to the property - no.
The object loadedLanguage - just should save the constants of one language. This object is passed to the template engine in HTML. Actually, the question is: how to fix these 2 bugs?) I have no idea at all, there is nothing sensible in the docks. It says how to connect to the database, and the connection is just successful
. I uploaded the code to github https://github.com/thesiv95/ids-parser/tree/dev
The contents of the database are in the db-backup folder.
UPD: language issue resolved. But the problem with the database is not solved. The index.js file, line 63. The data is displayed every other time, and it is not clear how to extract a specific property from the data.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Bebnev, 2019-05-04
@RomanBebnev

write to Skype roman_bebnev, I'll try to help

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question