Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Utilities #16

Merged
merged 2 commits into from
Aug 3, 2024
Merged

Add Utilities #16

merged 2 commits into from
Aug 3, 2024

Conversation

Davenchy
Copy link
Owner

@Davenchy Davenchy commented Aug 3, 2024

Add the following utilities:

  • Express body-parser for the request JSON body processing.
  • Add jsonResponseMiddleware and errorResponseMiddleware to ease request responding
    • Use res.json(obj: object) to respond with a JSON object.
    • Use res.error(message: string) to respond with an error JSON object.
      { "error": "error message..." }

@Davenchy Davenchy mentioned this pull request Aug 3, 2024
11 tasks
@M1-Elmasry M1-Elmasry merged commit dfbb18d into dev Aug 3, 2024
@M1-Elmasry M1-Elmasry deleted the feature/utilities branch August 3, 2024 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants