Build a REST API in Go using Fiber + GORM

Поділитися
Вставка
  • Опубліковано 25 січ 2025

КОМЕНТАРІ • 86

  • @iamrithmic
    @iamrithmic  Рік тому +1

    👽 Join the Discord Server (link in the description)

  • @rohankhatua2102
    @rohankhatua2102 Рік тому +7

    this video is gold, i needed to learn go for a project within a week and this covered largest chunk of it in under 2 hours

  • @iliatalebzade8751
    @iliatalebzade8751 2 роки тому +16

    The fact that you're repeating the crud functionality with different parts of this project is so awesome because after the second or third time people can see the pattern and have a higher chance of not just memorizing but learning how to implant a CRUD operation into a service, and don't let me start on how great the explanations were. great job with the tut and please do keep up with the good work!

    • @iamrithmic
      @iamrithmic  2 роки тому +2

      Thank you so much for this comment. I’m really glad that this tutorial came across that way. This comment has made my day!
      More to come

  • @delisky842
    @delisky842 Рік тому +3

    You are saving lives, this is an amazing follow along tutorial

    • @iamrithmic
      @iamrithmic  Рік тому +1

      Glad it was helpful & thank you for the comment!

  • @truthseeker2171
    @truthseeker2171 3 роки тому +18

    Coming from a Laravel and node background, this was just so simple to understand and follow. Thank you.

    • @iamrithmic
      @iamrithmic  3 роки тому +1

      Thanks for the comment! So glad this helped

  • @hamaed19
    @hamaed19 Рік тому +4

    nice content, keep it up!

  • @matkomilic8382
    @matkomilic8382 Рік тому +2

    Thank you, very useful tutorial, I've learned a lot as I needed this since my company wants me to start doing backend with GO. I created all this code along with you with my own modifications. Great stuff.

  • @Anl-ly6tx
    @Anl-ly6tx 11 місяців тому +2

    Amazing tutorial! Thanks a lot.

    • @iamrithmic
      @iamrithmic  11 місяців тому

      Thanks for the awesome comment! Glad it was helpful

  • @devjeff3192
    @devjeff3192 2 роки тому +6

    Have been using Django and Flask since I got into backend development and you made it pretty simple and easy to understand. Thank you soo much.

    • @iamrithmic
      @iamrithmic  2 роки тому +1

      Im really glad that this is the case, thank you!

  • @MrKeliv
    @MrKeliv 2 роки тому +1

    I came from Laravel and Rails. and I just learn Go and I found your tutorial. Its very helpfull for beginner like me.
    This is very simple example. Thanks

    • @iamrithmic
      @iamrithmic  2 роки тому

      Really glad that this was helpful

  • @anuj7286
    @anuj7286 Рік тому +2

    Great learning experience with this channel. Thank you and please create more videos.

  • @bndrmrtn1859
    @bndrmrtn1859 Рік тому +1

    thanks, now i understand the basics how fiber and gorm works 😁

  • @telostia
    @telostia 2 роки тому +6

    nice tutorial! great presentation 🙂 you should do more GO tutorials

    • @iamrithmic
      @iamrithmic  2 роки тому +1

      Thank you! Yes I have more planned :)

  • @sarvarjuraev1376
    @sarvarjuraev1376 2 роки тому +1

    Awesome. Now I got the big picture of API as a full

    • @iamrithmic
      @iamrithmic  2 роки тому

      Thanks for the comment! I’m glad this was useful

  • @georgegiosue
    @georgegiosue 2 роки тому +1

    thank you very much friend, very good explanation :)

    • @iamrithmic
      @iamrithmic  2 роки тому

      Thank you for the great comment!

  • @gam3rboy_official
    @gam3rboy_official 2 роки тому +1

    This is great.
    Btw vs code theme ?

  • @cristhiamtovar9003
    @cristhiamtovar9003 3 роки тому +4

    Thank you so much for sharing. I liked your Golang crash course, the repository was cozy because the commits matched with the timestamps. Can you upload this repo in the same way?

    • @iamrithmic
      @iamrithmic  3 роки тому +1

      thanks for the awesome comment :). Yes i will look into re uploading the code so it's more inline with each section. Thanks for the hint, will also keep this in mind for future content

  • @LearnProgramsCJ
    @LearnProgramsCJ 2 роки тому +1

    Nice tutorial and ecpected more on user login authentication(JWT) like so..❤

  • @toothless.tarantula
    @toothless.tarantula Рік тому +1

    Great Video.

  • @MuhammadUzair-vw4hw
    @MuhammadUzair-vw4hw 2 роки тому +1

    The video duration is more than one hour, but I took more than one day to learn and finish your video. Thank you for sharing, and keep it up!

    • @iamrithmic
      @iamrithmic  2 роки тому +1

      Im glad it was of use to you :). Thank you for the comment

  • @dextersilva4411
    @dextersilva4411 9 місяців тому

    what do you use to auto indent the data types of your model fields

  • @zeinabyari
    @zeinabyari 2 роки тому +2

    very usefull👍

  • @hos7012
    @hos7012 2 роки тому +2

    may i ask about the name of your vsc theme?

  • @asnafix
    @asnafix 2 роки тому +1

    Nice video, clear explaination. I think we should call that controllers instead of routes.

    • @iamrithmic
      @iamrithmic  2 роки тому

      Yes that is also a very valid name!

  • @rottenfanger
    @rottenfanger Місяць тому

    tenkyu bro

  • @elcanaldeflo
    @elcanaldeflo 2 роки тому +1

    thanks a lot for this video, for my that i am beginner is very import and a lot util this clase of video
    again thanks!

  • @ibanguniverse811
    @ibanguniverse811 Рік тому

    Nice tutorial, how do you align your code vertically ?

  • @sujaydas5024
    @sujaydas5024 2 роки тому

    what if I want to order multiple products at one go ?

  • @codeschool3964
    @codeschool3964 Рік тому

    Thank you very much. Your content was helpful. Better if you could use proper HTTP response codes as well.

  • @prashlovessamosa
    @prashlovessamosa Рік тому +1

    Thank you

  • @LearnProgramsCJ
    @LearnProgramsCJ 2 роки тому +1

    Hey, I am working on updateOrder function I have an issue in update User value for
    example
    var user model.User
    database.DB.Find(&user, "id=?", order.UserRefer)
    order.User = user(I am getting a issue here) like json: cannot unmarshal number into Go struct field

    • @LearnProgramsCJ
      @LearnProgramsCJ 2 роки тому +1

      Hey sorry this is fixed

    • @LearnProgramsCJ
      @LearnProgramsCJ 2 роки тому

      I am tring to update order like this
      order.User = user
      order.Product = product
      database.DB.Save(&order)
      Its not working let me know any input from you

    • @iamrithmic
      @iamrithmic  2 роки тому

      @@LearnProgramsCJ nice one 🔥

  • @daniel_2
    @daniel_2 2 роки тому +2

    Why do you use sometimes "int" and sometimes "uint"?
    Isn't that (id) the same field and should also use the same data type?
    Btw. good video!

    • @expectations2188
      @expectations2188 Рік тому +1

      "int" accepts both negative and positive numbers where "uint" accepts only positive numbers.

  • @abdulhamidkhorajiya2256
    @abdulhamidkhorajiya2256 3 роки тому +1

    Please add more videos on golang with gin framework

  • @hirakhax
    @hirakhax Рік тому +2

    Theme name please?

  • @harloom9603
    @harloom9603 3 роки тому +3

    how about testing API?

    • @iamrithmic
      @iamrithmic  3 роки тому +2

      Good idea, will think on that one

  • @thientran2978
    @thientran2978 2 роки тому

    thank you

    • @iamrithmic
      @iamrithmic  2 роки тому

      You're welcome 😊. Glad you enjoyed

  • @blacktipe9922
    @blacktipe9922 3 роки тому +3

    Are you from germany?

    • @iamrithmic
      @iamrithmic  3 роки тому +1

      I'm not from there, but i do live in Germany :)

    • @blacktipe9922
      @blacktipe9922 3 роки тому

      @@iamrithmic oh nice! Could you do React Typescript Authentication with a database? Its really asked and nobody has a good video about it

  • @TattedFaceJoey
    @TattedFaceJoey Рік тому

    Every time you mention "gorm", I think of "blue", as in Irish "gorm" [said a gur-um] means "blue". Also, speaking of blue in Irish, "fear/bean gorm" [far/ban gur-um] literally translates to "blue man/woman", but it means a black man/woman, as to call a person "black" or "dubh" [dove] means they are bad/evil.

  • @abdulhamidkhorajiya2256
    @abdulhamidkhorajiya2256 3 роки тому +1

    Great

  • @WW-qv8uw
    @WW-qv8uw 3 роки тому

    Great content. Could you plz add pagination function~

  • @johnsonkengne6229
    @johnsonkengne6229 2 роки тому +1

    please what is your thème name?

  • @nazdender
    @nazdender Рік тому +1

    Great video!
    VS Code Theme bro, pls :)

    • @nazdender
      @nazdender Рік тому

      Ok. Maybe I got it) This is Noctis Sereno with chaned background

    • @iamrithmic
      @iamrithmic  Рік тому +1

      Yes exactly

  • @김정호-n2r
    @김정호-n2r 2 роки тому

    37:44 memo 22.9.13

  • @dimakovalenkov7835
    @dimakovalenkov7835 2 роки тому

    спасибо = )

  • @abdulhamidkhorajiya2256
    @abdulhamidkhorajiya2256 3 роки тому

    Authentication please

  • @TattedFaceJoey
    @TattedFaceJoey Рік тому

    I gave up after 21 minutes. Only because some of the commands are for Linux (e.g. "APP_ENV=dev"). I desperately tried to get it to work in Windows, but it is slow to run (I think it's gcc)

  •  3 роки тому +1

    Hi, congrat about the content.
    I try to follow your tutorial, but i have a problem in app.Post("/api/users", routes.CreateUser)
    Message is:
    cannot use routes.CreateUser (value of type func(c *fiber.Ctx) error) as func(*fiber.Ctx) error value in argument to app.PostcompilerIncompatibleAssign
    I tried in my windows 10, and i thought that was some incompatible with windows, I tried in my ubuntu and had the same problem.
    I searched in web, but nothing else help me.
    How solve it?
    the code is exactly the same as yours.
    My go version is 1.17.5.
    Thanks
    Toti

  • @MohammadKorra
    @MohammadKorra Рік тому +2

    Great Video, but be careful DO NOT this in production. This called an N+1 query, where for each order, he's searching the product and the user db for the user and the product. This is not a very good practice. Instead try to use something like eager loading or table joins. But for an educational purpose, good material.

    • @iamrithmic
      @iamrithmic  Рік тому +1

      This is an important point. Yes in the context of this video it had to be overlooked. But in a professional setting, you're 100% correct

  • @ivandjoh7522
    @ivandjoh7522 2 роки тому

    Awesome tutorial, it easy to follow the step,
    by the way, what theme of vs code did you use? @rithmic

  • @toxicvoid0663
    @toxicvoid0663 Рік тому

    with air i get : "Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub"
    and with run main.go it says :" C compiler i.e. gcc is not in path

    • @toxicvoid0663
      @toxicvoid0663 Рік тому

      After countless tries i could not fix it, so i decided to use a different cgo free driver, which is although a bit slower but gets the job done