DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Discussion on: How to build an event management application in Node.js + React on Redis

Collapse
imichaelowolabi profile image
Michael Owolabi Author

Hi @tikam at what point exactly did you get this error?
Generally when you get a connection timeout error, it's due to connection problem usually network related. It will be helpful if you could provide more context.

Collapse
tikam02 profile image
Tikam Singh Alma

can you provide proper working code repository, because verify user email and hashed function was not working, promises were pending, debugged and re wrote it.

Thread Thread
imichaelowolabi profile image
Michael Owolabi Author

I'm not sure I understand what you mean.

Thread Thread
tikam02 profile image
Tikam Singh Alma

Why I'm asking for working code repository because lot of things are not handled in blog, while coding and running there are lots of bugs like this:

[nodemon] starting node src/app.js
internal/process/esm_loader.js:74
internalBinding('errors').triggerUncaughtException(
^

[ErrorReply: ERR unknown command 'FT.DROPINDEX', with args beginning with: 'EventRepository:index' ]
[nodemon] app crashed - waiting for file changes before starting...

Thread Thread
imichaelowolabi profile image
Michael Owolabi Author

The source code can be found here: github.com/iMichaelOwolabi/event-m...

Thread Thread
tikam02 profile image
Tikam Singh Alma • Edited on

Thanks man!

Thread Thread
imichaelowolabi profile image
Michael Owolabi Author

You're welcome.

Thread Thread
tikam02 profile image
Tikam Singh Alma

Btw, what to add in authorization header?

is it "token" or "authorization" : "token from login"

token : "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyS2V5IjoidXNlcjphYmN"

or

authorization: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyS2V5IjoidXNlcjphYmN"

{
"error": true,
"message": "Unauthorized user."
}

Thread Thread
imichaelowolabi profile image
Michael Owolabi Author • Edited on

Bearer token e.g. Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyS2V5IjoidXNlcjp...

If you're testing via Postman just choose Bearer Token option in the Authorization header.
Image description

If curl: "Authorization: Bearer {token}"

Thread Thread
Sloan, the sloth mascot
Comment deleted