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
 
 
 
 
 
 
 
 

Short Url on Google Cloud Function

Databse

  1. Enable Cloud Firestore on Google Cloud Function
  2. Connect the project to the Firebase
  3. Add the data to the database, and replace the word in [].
  • Collectons: links
  • Document: [SHORT_NAME]
  • Column:
    • link: [REDIRECT_URL]

Setup Env

echo "PROJECT_ID: $PROJECT_ID" >> .env

Deploy command

cd link
go mod vendor
cd ..
gcloud functions deploy link --source=link --entry-point=Link --runtime=go113 --trigger-http --quiet --env-vars-file .env

Deploy firebase routes

Edit firebase.json

firebase use $PROJECT_ID
firebase deploy --only hosting

Customism Domain Name

  1. Go to Project in Firebase
  2. Select the Hosting
  3. Create a new domain
  • Enter your domain
  • And Redirect your domain to current web site

About

Self Defined Short Url

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages