How To Setup A Golang + Templ Project Structure

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ธ.ค. 2023
  • ► Join my Discord community for free education 👉 / discord
    ► Exclusive Lessons, Mentorship, And Videos 👉 / anthonygg_
    ► Enjoy a 60% Black Friday Discount on My Golang Course 👉 fulltimegodev.com
    ► Learn how I became a self-taught software engineer 👉fulltimegodev.com/#mystory
    ► Follow me on Twitter 👉 / anthdm
    ► Follow me on GitHub 👉 github.com/anthdm
    github.com/a-h/templ
    echo.labstack.com/
    SUBSCRIBE OR NO MARGARITAS
    ╔═╦╗╔╦╗╔═╦═╦╦╦╦╗╔═╗
    ║╚╣║║║╚╣╚╣╔╣╔╣║╚╣═╣
    ╠╗║╚╝║║╠╗║╚╣║║║║║═╣
    ╚═╩══╩═╩═╩═╩╝╚╩═╩═╝

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

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

    ► Join my Discord community for free education 👉 discord.com/invite/Ac7CWREe58
    ► Exclusive Lessons, Mentorship, And Videos 👉 www.patreon.com/anthonygg_
    ► 60% OFF on my Golang course 👉 fulltimegodev.com
    Thanks for watching

  • @x53LL33
    @x53LL33 6 หลายเดือนก่อน +50

    this was amazing, new videos continuing from here with HTMX and connecting to a backend like supabase/ pocketbase would round it all of for many people to get started

    • @ToddHeslin
      @ToddHeslin 6 หลายเดือนก่อน +10

      Pocketbase in particular as it can be imported as a library and also uses echo for routing. Could be the ultimate full stack with admin. 😍

  • @milanutekal5083
    @milanutekal5083 6 หลายเดือนก่อน +30

    ThePrimeTime "From Svelte to Go and HTMX"

  • @nicklesseos
    @nicklesseos 6 หลายเดือนก่อน +3

    Thank you for making this! This is a lot easier to understand then the stream

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

    Really good video! I really enjoy the Templ + Go stuff. Would be very grateful about more in-depth problems you solved with this combination.

  • @manee427
    @manee427 6 หลายเดือนก่อน +5

    Hallo Anthony, amazing video. feedback for voice :it is in my opinion good and clear. size of font for coding is very good and can be visible even on small devices. keep going nice job

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

    Thank you for posting this! I'm a new developer trying to figure out what the best tools are for website building, and this seems really interesting. As a musician who's wanting to build a passion project website, getting things up and running in a simple and straightforward manner seems better than React!
    For your sound, I would recommend that you add a wind screen between you and your mic. That will make the 'p' or 'pop' sounds far less noticeable. Second, you may want to position your mic further away from your face. They are pretty sensitive and will record your voice even if it's a little further away. If you are picking up background noise/ white noise, you can add a decibel [dB] filter. Test out how much you want to cut out - be careful not to cut into your regular speaking voice. This will also cut out any breath intakes and will make you sound even more pro!

  • @tigranrostomyan9231
    @tigranrostomyan9231 6 หลายเดือนก่อน +11

    you have the best youtube channel about golang... it's crazy how good your content is!

    • @anthonygg_
      @anthonygg_  6 หลายเดือนก่อน +4

      Ty ❤️

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

      I absolutly agree, none of other golang channels makes the settup and internal architecture so well and consistent.

  • @xxgunnery
    @xxgunnery 6 หลายเดือนก่อน +9

    Bro Golang and Templ are amazing, I'm loving it. The dev tooling for Templ is fantastic + air for hot reload. Perfection!

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

      Templ already has hot reload. The documentation says to use: templ generate --watch --proxy="localhost:8080" --cmd="runtest"

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

    Really nice video. Keep them coming!

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

    Good video, thanks Anthony!

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

    Amazing. More videos about templ and htmx please!

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

    Great video, thank you!

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

    Weve been waiting for this! U rock!

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

    This is very informative, thank you. This is, however, the first video I've had to watch at 3/4 speed - you were flying

  • @cole.maxwell
    @cole.maxwell 6 หลายเดือนก่อน +9

    For audio feedback: I highly recommend the “Electro-Voice RE20” + “Focusrite Vocaster One” setup. It’s basically plug and play. The RE-20 keeps your voice volume pretty consistent and eliminates pops while you move around the mic. You don’t need to eat the mic either like a shure sm7b. The Vocaster has a feature that can automatically set the gain on the mic too so you don’t have to mess with that either. Just my 2¢
    Thanks for putting this together!

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

      Thanks for the feedback

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

    This is an amazing tutorial, thanks!

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

    Thanks for this great intro! You could also consider stepping away from MVC and add the handlers to the templ files. This way it will be more like a component based structure which is easier to maintain.

  • @IvanRandomDude
    @IvanRandomDude 6 หลายเดือนก่อน +6

    I wish there was more interest and effort to develop fully functional InertiaJS adapter for Go. I was using it in Laravel and I was blown away. I think it is the best way to connect BE and FE.

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

    Scotlands greatest export does it again! Fantastic videos Tony!

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

    great video my man

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

    cool. I followed all the steps and errors 100%. Thank you. I really do understand templ better now

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

    Hi Anthony, Big Fan.

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

    Love your work mate 🎉

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

    You can also implement `echo.Renderer` and use templ with echo's built-in `c.Render(...)` func

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

    Just discovered your channel :) Love the laid back style. I'm coming from Django + HTMX. Go looks very promising. Thanks for what you do.

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

    Regarding a tip for your sound. Cutting the low bass (High Pass Filter from 100Hz maybe) could help to be able to boost the overall volume. Makes it easier on the ears too with less boomy popping noises for headphones users like me ;)
    Thanks for the great video btw!

  • @bilbobeutlin3405
    @bilbobeutlin3405 6 หลายเดือนก่อน +4

    Thank you so much 🙏
    Go + templ will be the hype stack of 2024

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

    Love the video. My only complaint about the sound is the plosives. Highly recommend a pop filter.
    Keep up the great vids!

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

      Yes its super annoying. I had a popfilter but didnt help to much either

  • @DanteMishima
    @DanteMishima 6 หลายเดือนก่อน +3

    The blind homies appreciate the zoom 😂

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

    more of this please. and htmx

  • @more-sun
    @more-sun 6 หลายเดือนก่อน +4

    Any tutorials for how you use web components for some interactivity?

  • @darthvader4899
    @darthvader4899 6 หลายเดือนก่อน +6

    My only problem right now with templ + htmx is the setup. I couldn’t setup the intellisense and autocomplete in vscode. Go language server doesn’t work in templ files

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

    Yo this is cool!

  • @godofpro5767
    @godofpro5767 6 หลายเดือนก่อน +5

    Very good video, i think a video on HTMX would be amazing

  • @nexovec
    @nexovec 6 หลายเดือนก่อน +12

    Hey Anthony here are some suggestions for when you decide to make an HTMX video. I'm very interested in the extensions for websockets and SSEs, is that actually useable? Do you use hyperscript? Do you use event handlers for htmx and if yes could you go through them? Are there any efficient methods to read javascript files into templ files(because of linting and so on)?

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

    Will we get the htmx course included if we already purchased the full time go dev course?

  • @0lange
    @0lange 6 หลายเดือนก่อน +2

    Please make a video on deployment (when you also have a database)

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

    A man's got to do what a man's got to do

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

      Men go to do what a Go man's to do.

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

    I'd love to see a tutorial video on how you navigate fast in VScode with this VIM extension.

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

    Amazing video. Could you add a crud golang 1.22 using built-in template ? Postgrsql or sqlite ...

  • @ShivamSingh-bl3fg
    @ShivamSingh-bl3fg 6 หลายเดือนก่อน

    Sir, I have recently started with golang and I like your content so much. Also could you please share the name of the theme that you use in VScode.

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

    Sick

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

    Hey Anthony! Do you have some place where you share your vs code setup?

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

      Its somewhere on my github. github.com/anthdm

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

    I'm having trouble trying to use css libraries like tailwindcss.

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

    Instead of a Makefile, I'm currently using the live reload application 'wgo' to build and generate the templates, Tailwind CSS and also the server application in one go (heh), if there's any change in my project. :)
    Example command:
    wgo -file=.templ -file=.go -xfile=_templ.go templ generate :: npx tailwindcss -c ./configs/tailwind.config.js -i ./views/shared/input.css -o ./public_html/css/tailwind.css :: go run cmd/server/main.go
    wgo will apply templ generate to .templ and .go files (excluding the '_templ.go' files that it generates, otherwise it keeps going!)
    then it will generate my Tailwind CSS using 'npx tailwindcss' to produce a 'tailwind.css' output file and finally it 'go runs' the server application.
    Change anything, refresh browser.. done! :)

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

    Which vscode theme are you using? It's really easy on the eyes

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

      Gruvbox

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

    is there any way to fix the damn vscode? that can be a real pain in the ass when developing

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

    Would you add the generated templ files to a gitignore in a real project, or leave them in the git history?

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

      Good question. Not sure. Maybe ignoring is a good idea

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

    holy s#!t .... we are living in the future. thanks for this video

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

    isnt Gin support func (context) error? I used to use it in my apis

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

    👏👏👏👏👏

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

    I saw this stack getting hyped up and tried it out by following your video (thanks btw!). But it's not for me for three reasons:
    - I really miss the complete and working code completion I get in Svelte templates.
    - the template compilation step is something you have to deal with yourself instead of being automatic
    - you are left on your own to figure out a good structure for your project. Before this tutorial I was completely lost
    So I guess what I want is a mature framework. But maybe we get there in the future.

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

      You want a framework :). Go peeps generally want libraries :).

  • @trbry.
    @trbry. 6 หลายเดือนก่อน +1

    gave a comment (this) and like just for the 'I don't like short fast videos' comment ^^

  • @ho-dg6zi
    @ho-dg6zi 3 หลายเดือนก่อน

    So can anyone explain is this server side rendering?

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

    For the people using Fiber that are getting plain text returned, you can fix it by using:
    func Render(c *fiber.Ctx, component templ.Component) error {
    var writer bytes.Buffer
    component.Render(c.Context(), &writer)
    // Send the rendered component to the client.
    return c.Send(writer.Bytes())
    }
    There's probably a better way of doing it, if you have a better way please say in replies

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

    Pro just use v8 to run react in go server

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

    I don't know, maybe I am too stupid but I have problems with install templ. edit: I forgot add the directory to the path :) export PATH=$PATH:$(go env GOPATH)/bin

  • @dj-yv7oi
    @dj-yv7oi 3 หลายเดือนก่อน

    can i please type

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

    i dont recommend you to user templ, juste golang html/template

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

    Hi Anthony, Its super experience to learn from your viodeo! By chance did you release your next videos in this series th-cam.com/video/BKm1zVlUmrI/w-d-xo.html ?

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

    @anthonygg_ You are the best and a beast my Bro ! Your content is so gooood !!!!!!! Love ya !

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

    if you researsh for us and build a best practice setup with a framwork(every one ) with tmpl and htmx i will help to save a lot of time. i would be tanksful. Do it plsssssss