Skip to content

Don't hold state in module #14

@moll

Description

@moll

Hey,

State is held on the file level in this module. This is not a good strategy because it prevents using the module twice for different routes. It will also break should another piece of code in the app or in any of its dependencies also use this module. Under various circumstances two calls to require("connect-ratelimit") may end up with the same instance.

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions