Build a REST API in Go using Fiber + GORM

Поділитися
Вставка
  • Опубліковано 7 вер 2024

КОМЕНТАРІ • 85

  • @iamrithmic
    @iamrithmic  7 місяців тому +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

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

      Im glad this helped :)

  • @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

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

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

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

      Thanks for the comment! So glad this helped

  • @delisky842
    @delisky842 7 місяців тому +3

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

    • @iamrithmic
      @iamrithmic  7 місяців тому +1

      Glad it was helpful & thank you for the comment!

  • @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!

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

    nice content, keep it up!

  • @matkomilic8382
    @matkomilic8382 11 місяців тому +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.

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

      Fantastic and best of luck!!

  • @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

  • @telostia
    @telostia Рік тому +6

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

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

      Thank you! Yes I have more planned :)

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

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

  • @bndrmrtn1859
    @bndrmrtn1859 11 місяців тому +1

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

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

      That's great to hear :)

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

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

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

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

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

    Amazing tutorial! Thanks a lot.

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

      Thanks for the awesome comment! Glad it was helpful

  • @cristhiamtovar9003
    @cristhiamtovar9003 2 роки тому +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  2 роки тому +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

  • @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

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

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

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

    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.

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

    thank you very much friend, very good explanation :)

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

      Thank you for the great comment!

  • @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!

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

      You are more than welcome

  • @codeschool3964
    @codeschool3964 10 місяців тому

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

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

    Great Video.

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

      Glad you enjoyed it

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

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

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

      Yes that is also a very valid name!

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

    This is great.
    Btw vs code theme ?

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

    Please add more videos on golang with gin framework

  • @dextersilva4411
    @dextersilva4411 4 місяці тому

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

  • @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.

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

    very usefull👍

  • @nazargavrilov873
    @nazargavrilov873 11 місяців тому +1

    Great video!
    VS Code Theme bro, pls :)

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

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

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

      Yes exactly

  • @user-yv5ri7tx9k
    @user-yv5ri7tx9k 7 місяців тому +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  7 місяців тому +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

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

    Thank you

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

      You are more than welcome!

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

    may i ask about the name of your vsc theme?

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

    Nice tutorial, how do you align your code vertically ?

  • @LearnProgramsCJ
    @LearnProgramsCJ Рік тому +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 Рік тому +1

      Hey sorry this is fixed

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

      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  Рік тому

      @@LearnProgramsCJ nice one 🔥

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

    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)

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

    Great content. Could you plz add pagination function~

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

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

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

    Great

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

    how about testing API?

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

      Good idea, will think on that one

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

    Theme name please?

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

    thank you

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

      You're welcome 😊. Glad you enjoyed

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

    please what is your thème name?

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

    спасибо = )

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

    Are you from germany?

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

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

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

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

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

    Authentication please

  • @user-lg3zg8oi5d
    @user-lg3zg8oi5d 2 роки тому

    37:44 memo 22.9.13

  •  2 роки тому +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

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

    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 9 місяців тому

      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

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

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