DEV Community

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

 
imichaelowolabi profile image
Michael Owolabi

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

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

Thread Thread
 
tikam02 profile image
Tikam Singh Alma • Edited

Thanks man!

Thread Thread
 
imichaelowolabi profile image
Michael Owolabi

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 • Edited

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