Skip to content

Feature: add rate limit middleware - #115

Merged
rsaz merged 4 commits into
expressots:mainfrom
devsargam:feature/add-rate-limit-middleware
Oct 1, 2023
Merged

rsaz merged 4 commits into
expressots:mainfrom
devsargam:feature/add-rate-limit-middleware

Conversation

@devsargam

Copy link
Copy Markdown
Contributor

Pull Request Guidelines

Our guidelines for submitting a pull request.

Before submitting a Pull Request, please make sure you have verified the following:

  • The commit message follows our guidelines:
    • A good commit message should be two things: meaningful and concise. It should not contain every single detail, describing each changed line—we can see all the changes in Git—but, at the same time, it should say enough to avoid ambiguity.
    • We use Microverse's commit message convention
    • The convention stablish that a commit message has to be in the present tense, imperative and lowercase.
    • Example: fix typo in README.md
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Currently there is no implementation for rate limit in codebase.

Issue Number: #113

What is the new behavior?

This PR adds functionality to use express-rate-limit

Does this PR introduce a breaking change?

  • Yes
  • No

If this PR contains a breaking change, please describe the impact and migration path for existing applications below.

Other information

This PR is a draft feel free to give me advises regarding my code.

@ghost

ghost commented Oct 1, 2023 •

Copy link
Copy Markdown
👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@devsargam

devsargam commented Oct 1, 2023 •

Copy link
Copy Markdown
Contributor Author

@rsaz can you review it upto now?

@rsaz

rsaz commented Oct 1, 2023

Copy link
Copy Markdown
Member

@rsaz can you review it upto now?

Replied here: #113 (comment)

@rsaz rsaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your code so far follows the standard, really good. You are missing two things:
1 - Look at packages/core/src/middleware/index.ts to the index.ts file inside of the middleware folder and see what you're missing there.
2 - Look at the middleware-resolver.ts you are missing something there as well in the middlewareRegistry object mapping there.

When you fix these two things you can follow the steps I gave you in the issue, then if its all good submit to me for review.

;)

@devsargam
devsargam marked this pull request as ready for review October 1, 2023 08:21
@devsargam
devsargam requested a review from rsaz October 1, 2023 08:21
@devsargam devsargam changed the title Feature/add rate limit middleware Feature: add rate limit middleware Oct 1, 2023

@rsaz rsaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! How was your experience testing?

@rsaz rsaz added enhancement New feature or request good first issue Good for newcomers needs triage Needs analysis hacktoberfest Hacktoberfest issues labels Oct 1, 2023
@rsaz
rsaz merged commit 1fa0552 into expressots:main Oct 1, 2023
@devsargam

Copy link
Copy Markdown
Contributor Author

It was great everything went really smooth. If this project needs anymore hands I'll be always there. Are there parts that I can contribute to?

@rsaz

rsaz commented Oct 1, 2023

Copy link
Copy Markdown
Member

It was great everything went really smooth. If this project needs anymore hands I'll be always there. Are there parts that I can contribute to?

We are working on to be the go to framework when you think about developing backend apps in with nodejs+typescript. :) Will be very helpful you can ⭐ the project and share with your colleagues. 👍🏻

There is lot's of things to do, but I need to laid out the tasks as we did with the middleware mechanics.

Right now, the most important thing to get it done is all unit tests for all the core package. You can find examples here: https://github.com/expressots/expressots/tree/main/packages/core/test

Thank you for your contribution, looking forward to get new updates from you. 😄

@rsaz rsaz mentioned this pull request Oct 1, 2023
4 tasks done
@devsargam
devsargam deleted the feature/add-rate-limit-middleware branch October 2, 2023 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request good first issue Good for newcomers hacktoberfest Hacktoberfest issues hacktoberfest-accepted needs triage Needs analysis

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants