Node.js MongoDB '.then' throws 'ERR_HTTP_HEADERS_SENT' error
I'm doing mongodb database after tutorial from NetNinja. Since I'm kinda bad with js, I'm just following his actions. I'm stuck with: node:internal/errors:496 ErrorCaptureStackTrace(err); ^ ... Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client I'm having…