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

Avoid possible collision #10

Open
BrenQ opened this issue Feb 14, 2020 · 0 comments
Open

Avoid possible collision #10

BrenQ opened this issue Feb 14, 2020 · 0 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@BrenQ
Copy link
Owner

BrenQ commented Feb 14, 2020

Generating a random code can cause collisions. Even more in the future.

A possible approach in the future is to generate a counter in mongo that will increase its value.

Given this value we can encode or decode it in base62 to obtain a short url

@BrenQ BrenQ added bug Something isn't working good first issue Good for newcomers labels Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant