How To Build a Complete API In Golang (Docker, JWT, MySQL)

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 พ.ค. 2024
  • ► Join the private community to level up as software engineer: selfmadeengineer.com
    In this video we're going to be building a complete REST API in Golang using JWT, MySQL and at the end dockerize the whole thing so we can ship it to the cloud.
    Links:
    Patreon: / tiagotaquelim
    Discord: / discord
    Github: github.com/sikozonpc/
    Resources:
    Project source code: github.com/sikozonpc/go-rest-api
    Direnv (for envs variables loading): direnv.net/
    More complex production example: • Complete Backend API i...
    Hope you liked and thanks for watching!
    Time Stamps 👇
    00:00:00 Intro
    00:01:31 API Server
    00:05:46 Database
    00:11:28 Env vars sourcing
    00:14:04 Tasks Service
    00:24:42 Functional testing tasks
    00:26:10 Unit testing the tasks service
    00:38:00 Add JWT authentication
    00:47:21 Functional testing auth
    00:47:50 User register endpoint
    00:56:05 Docker service
    Video titles ideas (for the algo):
    REST API in Golang
    Building a JSON API in Golang
    How to build a REST API in Golang

ความคิดเห็น • 61

  • @TiagoTaquelim
    @TiagoTaquelim  2 หลายเดือนก่อน +4

    I've made a more in-depth video/course that will cover some of your guys questions here: th-cam.com/video/7VLmLOiQ3ck/w-d-xo.html
    Thanks for watching

  • @edwardliemingwong7683
    @edwardliemingwong7683 26 วันที่ผ่านมา +1

    This is amazing. Thanks Tiago!

  • @user-xp4mm1zu2y
    @user-xp4mm1zu2y 3 หลายเดือนก่อน +3

    Really appreciate the video with actual code and not just some theory

  • @djanthony6662
    @djanthony6662 2 หลายเดือนก่อน +1

    Thanks, man. right when I need these types of videos. Subbed.

  • @sagarchauhan8460
    @sagarchauhan8460 2 หลายเดือนก่อน +4

    👍 more content like this in go only, started this one.

  • @helloworld7796
    @helloworld7796 2 หลายเดือนก่อน +1

    Actually a high quality content. Keep up the great work

  • @mrtitanhearted3832
    @mrtitanhearted3832 2 หลายเดือนก่อน +5

    I actually was searching for something exactly like this! Thanks a bunch!!! That was very useful! Keep up!

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน +1

      Awesome! Thank you so much!

  • @rostyslav5334
    @rostyslav5334 2 หลายเดือนก่อน +1

    Thanks mate, suuuuper useful
    Appreciate your hard work!

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน

      Thank you so much for the kind words!

  • @SajadJalilian
    @SajadJalilian 2 หลายเดือนก่อน +1

    I want to thank you for putting in the time. Keep doing it.

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน

      Thanks a lot! 💪

  • @MohammadLsk
    @MohammadLsk 2 หลายเดือนก่อน +1

    Recently discovered your channel and I must say, I've learned a lot from your content. Keep up the great work

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน

      Thank you 💪🔥

  • @mr.daniish
    @mr.daniish 2 หลายเดือนก่อน +1

    Love it!

  • @eduardosalles9212
    @eduardosalles9212 2 หลายเดือนก่อน +2

    muito bom Tiago.. Thanks a lot

  • @David-xy4nw
    @David-xy4nw 2 หลายเดือนก่อน +1

    My man is alergic to creating directories

  • @prashlovessamosa
    @prashlovessamosa 3 หลายเดือนก่อน +2

    thanks

  • @mohidenadam
    @mohidenadam 2 หลายเดือนก่อน +2

    very nice content.

  • @amarboro
    @amarboro 2 หลายเดือนก่อน +3

    really good video

  • @dylangrijalva944
    @dylangrijalva944 2 หลายเดือนก่อน +1

    Great video, btw: which font and ide theme are you using? Looks great!

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน

      Thanks! The theme is called Gruvebox and the font is either "Menlo" (for mac) or "JetBrains Mono".

  • @fullstack_journey
    @fullstack_journey หลายเดือนก่อน +1

    hello my new favourite golang content creator.

    • @TiagoTaquelim
      @TiagoTaquelim  หลายเดือนก่อน

      Hey! Thank you so much!

  • @arturfil
    @arturfil 2 หลายเดือนก่อน +1

    I'm curious I see that you have a very flat file structure, other than simplicity do you see a reason for not using folder structure like the cmd/ interna/ pkg/ handlers/ etc? Awesome video!

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน +1

      Thanks man! I did that for a couple reasons: firstly so I could move faster and so it would not be opinionated.
      However I've seen a lot of people are interested in a more "complete" folder structure so I'm currently working on a bigger video/course where I do that.

  • @supermanish4429
    @supermanish4429 2 หลายเดือนก่อน +1

    prettty cool, is it possible that u can create an industry level go api using gin, and postgres which are both in docker
    container

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน +1

      Yes that is possible

  • @vincentkho5591
    @vincentkho5591 2 หลายเดือนก่อน

    Hi Tiago, I used to use MVC folders structuring, can we somehow structure this project also in different folders? or is this the best practice in go ?

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน

      Sure it's completely to personal preference. I've decided to not do that to not be opinionated during the tutorial.

  • @user-ed2zi5qp9g
    @user-ed2zi5qp9g 2 หลายเดือนก่อน

    how have you configured vs code like that? seems great!

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน

      I have my dotfiles on my github: github.com/sikozonpc/dotfiles

  • @user-pc7bv8vk4p
    @user-pc7bv8vk4p 2 หลายเดือนก่อน +2

    Hi sir, upload complete backend tutorial in golang

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน +3

      I'm currently working on a big complete backend API video/course!

  • @IkraamDev
    @IkraamDev 3 หลายเดือนก่อน +1

    In production, how would you structure these files into folders?

    • @TiagoTaquelim
      @TiagoTaquelim  3 หลายเดือนก่อน +1

      It really depends on how you want to structure it and how the project is going to grow.
      But, I have left in the description of the video an example of a project that I've been working on and I've separated everything into folders.
      Where each folder is domain.

  • @abhiprayasaputra9426
    @abhiprayasaputra9426 2 หลายเดือนก่อน

    What software you use for that sql client ? Thanks 16:29

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน +1

      It's called TablePlus

    • @abhiprayasaputra9426
      @abhiprayasaputra9426 2 หลายเดือนก่อน

      @@TiagoTaquelim hey thank you for telling me the name. Cpuld you also provide a simple steps to initiate the connection from the beginning ? I fail to make a connection like something is missing

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน +1

      @@abhiprayasaputra9426 Join the Discord server and post where do you need help there, it's easier to explain.

    • @abhiprayasaputra9426
      @abhiprayasaputra9426 2 หลายเดือนก่อน

      @@TiagoTaquelim oh okay , thanks

  • @monarchgam3r
    @monarchgam3r 2 หลายเดือนก่อน

    Off topic but please what theme do u use?

  • @what1heh3ck
    @what1heh3ck 3 หลายเดือนก่อน

    what is your theme?

    • @TiagoTaquelim
      @TiagoTaquelim  3 หลายเดือนก่อน

      It's called gruvebox.

  • @TheIsraelMendoza
    @TheIsraelMendoza 3 วันที่ผ่านมา

    New to Golang here. Not even sure if I’ll go deeper into it tbh.
    Question: Why do I have the impression Go devs overuse single-character variable names? It’s just awful!!!

  • @dreamxz
    @dreamxz 3 หลายเดือนก่อน +2

    vi logo que era tuga pa

  • @youranonymousyoutuber4051
    @youranonymousyoutuber4051 2 หลายเดือนก่อน

    Why can't u use folders?

    • @TiagoTaquelim
      @TiagoTaquelim  2 หลายเดือนก่อน

      Simplicity.
      In my latest video I use a complete folder structure.

  • @jordiburgos
    @jordiburgos 2 หลายเดือนก่อน

    Nice! I would like to see this but starting from an OpenAPI spect description. How much code we could save with a generator?

  • @udbhavrohatgi3653
    @udbhavrohatgi3653 29 วันที่ผ่านมา

    You Haven't Explained about How to used WIthJWTAuth, You have just used it, 15:21 (there no WithJWTAuth) but at 16:43 voila

    • @udbhavrohatgi3653
      @udbhavrohatgi3653 29 วันที่ผ่านมา

      not at 38:38 I understand it ( while testing you haven't changed it, but I don't know why it is showing that at 16:43?)