When I run a sequelize request in the console during a debugging session, the return is an unresolved promise. But how can I get the result of this query / promise instantly?
How am I doing this so far:
Author.findOne({}) .then(function(error, result){ debugger; //now I can work with the outcome in the console })
This approach is extremely time-consuming, simple changes to the request will require a repeat of the entire debugging session to see the new result.
, Node , , , , JavaScript/ . , , . API . sequelize, .
REPL. node --inspect-brk Node Chrome dev ( chrome://inspect). sequelize, db, Author ( script, --inspect), :
node --inspect-brk
chrome://inspect
Author
--inspect
await Author.findOne({})
, ( → ), / (copy(JSON.stringify(temp1))) .. .
copy(JSON.stringify(temp1))
Source: https://habr.com/ru/post/1689125/More articles:Ошибка android.system.ErrnoException - javaФункциональное программирование: насколько далеко должна идти неизменность? - immutabilityFastest way to find the number of lines in go? - performancehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1689123/naturally-sort-a-list-moving-alphanumeric-values-to-the-end&usg=ALkJrhgrl3X0fYMh5qsKO70rjymWUVcloADifferences between numpy.random.rand vs numpy.random.randn in Python - pythonif recursion is still the worst time complexity - cWhy is this endless for the cycle? - javaRough carousel as a navigation for another - javascriptWhat is the difference between using kubectl and replacing kubectl - kubectlHow does a type become a function in Go? - syntaxAll Articles