edwardhotchkiss / short Goto Github PK
View Code? Open in Web Editor NEWPromise-based Node.js URL Shortener backed by Mongoose.js
License: MIT License
Promise-based Node.js URL Shortener backed by Mongoose.js
License: MIT License
Steps to reproduce:
short.generate
and specify a hashExpected behavior:
Actual behavior: a random hash is generated
Gist: https://gist.github.com/matmar10/6659ce1d67df8f79eda4
It seems change #26 had no effect.
Hello there,
I would like to ask if there is a way to automatically delete a record once the specified time is achieved (e.g. expiration is 1 minute [60000ms])? Thank you
Specifying a hash with a URL that already exists has no effect.
generate
method and specify a URL to create a short URL documentA new document should be created using the provided hash
The first document is returned with the first auto-generated hash. The specified hash has no effect.
Hi There,
Currently, the latest version of short is 2.6.0. It contains a transitive dependency mongodb of version 2.0.34 which has high-risk security vulnerabilities. These vulnerabilities of mongodb are fixed at version >= 3.1.13. Can we get the updated vulnerabilities free version of the short package?
Whats the use of taking a URL as an argument when it is not used in the function here https://github.com/edwardhotchkiss/short/blob/master/lib/short.js#L15 ?
Whats the guarantee that "hasher" will always return a unique hash?
Thanks for the helpful library. I'm using short in an app that generates a short URL for the same long URL a few times per long URL. It would be cool if the short URL was the same each time. Obviously I can keep it around, so not a big deal, but it seems like this would be a feature.
The homepage link on nodemodules and npm are broken/out of date
npm shows the older 2.5.2 version, could you please update the package on npm so that using the newer 2.6.0 version is easy
I would really love to have a feature to update the data or URL corresponding to a given hash. the reason being that I don't want to fiddle with the mongo database used by mongoose directly.
I intend to implement it for myself, and would definitely love to push it upstream as well,
The api could be
short.update(hash,{
URL: '',
data: ''
}
of course, the URL
and data
are optional(one might not want to update both), and the new keys in data
will add to the existing keys if not present, and update the existing key if the key is already present.
Let me know what you think and if you have any api preferences for this feature
Hi,
I haven' t been able to get this to work.
None of the methods in ShortURL return.
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.