Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

akiirobot/short-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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