https://javascript.plainenglish.io/how-to-fix-the-cant-set-headers-after-they-are-sent-to-the-client-error-in-an-express-app-e00a4b54b33e