Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Firebase URL Shortner

A serverless url shortener made with Firebase

Live Demo

Setup

Edit index.js config variables

Replace with Firebase project ID (Can be found on project dashboard)

let projectID = "fire-url"

Replace with desired Firestore collection for shortned urls to be saved

let collection = "list"

(Optional) Edit if url where urls are shortened will not be the same as the shortened url

var local = window.location.href

(Optional) Edit length of random hash

var hashLength = 5

Firestore Rules

Basic rules to allow users to shorten links.
Replace COLLECTION with the collection name used in index.js

service cloud.firestore {
  match /databases/{database}/documents {
    match /COLLECTION/{url} {
      allow read, create;
    }
  }
}

About

šŸ”„ A serverless url shortener made with Firebase

Resources

License

Releases

No releases published

Packages

No packages published