Skip to content

Instantly share code, notes, and snippets.

View andreguerrerosilvera's full-sized avatar

andreguerrerosilvera

View GitHub Profile
@andreguerrerosilvera
andreguerrerosilvera / README.md
Created September 4, 2024 06:41 — forked from nivethan-me/README.md
Add Cloudflare Custom Domain to Vercel

Add Cloudflare custom domain to Vercel

  1. Sign up and sign in to Cloudflare https://dash.cloudflare.com/sign-up.
  2. In your Cloudflare dashboard, select the Domain Registration > Register Domains tab.
  3. Search for your favorite domain and purchase it. In my case, I purchased the domain https://nivethan.me/ for my portfolio.
  4. Sign in to Vercel and go to your dashboard, where you can see all your projects in the Overview tab.
  5. Click on a project and on the top right, select Domains.
  6. Type your domain in the text box, e.g., nivethan.me, and click Add.
  7. Select the recommended option: Add www.nivethan.me and redirect nivethan.me to it.
  8. Vercel will show an invalid configuration under your domains and display the relevant A record IP under nivethan.me and a CNAME IP under www.nivethan.me. These need to be set up on Cloudflare to make it work.
@andreguerrerosilvera
andreguerrerosilvera / POST.md
Created March 25, 2019 05:04 — forked from rikukissa/POST.md
React Hook prompting the user to "Add to homescreen" 🏠 #PWA #React

React Hook for showing custom "Add to homescreen" prompt

Demo:
Twitter

Simple React Hook for showing the user a custom "Add to homescreen" prompt.

const [prompt, promptToInstall] = useAddToHomescreenPrompt();