Node based URL shortener that uses SQLite
var shortness = require'shortness';// Adding!shortnessadd''console.log'new url: ' + shortId;// output: "new url: ";// Retreiving!shortnessget't8j30vns'console.log'real url: ' targetURL;// output: "real url: ";
This is really just a very thin wrapper around sqlite3. It doesn't do any validation. You will need to do your own HTTP (or whatever protocol suits your fancy) stuff around this module. Really, it's just a glorified key value store.