Skip to content

The request body is undefined unless we add bodyParser or express.json #817

@Safiya-B

Description

@Safiya-B

Question
Hi,
I just wanted to note that I had this error appear when I ran the server locally :

Screenshot 2023-08-16 at 19 55 57

I found out it was caused by the req.body that was undefined, so I fixed it by adding the express.json() middleware in the index.ts file.
Additional context
Screenshot 2023-08-16 at 19 59 30

Was there another way to make it work without adding the middleware?

Thank you for the app, it is very helpful 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions