Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Let's build a URL shortener in Go

Avatar for Hanji Chung Hanji Chung
December 18, 2023

Let's build a URL shortener in Go

Hanji_DevFest2023

Avatar for Hanji Chung

Hanji Chung

December 18, 2023
Tweet

More Decks by Hanji Chung

Other Decks in Technology

Transcript

  1. About me • Freelancer, but open to work • 3+

    backend work experience • Only using Golang in toy projects My LinkedIn
  2. Summary • Project Setup 🛠 • Igniting The Web Server

    ☄ • Store Service Setup 🛠 • Storage API Design • Shortener Generator Algorithm • Handlers & Endpoints
  3. Project Setup 🛠 • Initialize the go project, using go

    mod $ go mod init your-projectname • Create main.go file and add the code • Installing project dependencies $ go get github.com/go-redis/redis/v8 $ go get -u github.com/gin-gonic/gin
  4. Igniting The Web Server ☄ • Launching the web server

    for first time • Run again the main.go file and go to http://localhost:9808/ in the browser or any rest client tool