How I build and deploy my Go applications (Templ & HTMX)

preview_player
Показать описание
Become a YT Members to get extra perks!

My Products

Useful Links
Рекомендации по теме
Комментарии
Автор

My notifications are delayed lol how am I getting a notification like two minutes later lol YouTube is against me. good job babe! Love your haircut 😘

SeibertSwirl
Автор

A much cheaper alternative is to deploy directly to a VPS or VDS on providers like Hetzner or Linode, things like railway, vercel, fly, and so on can really fuck you over with fees if you make a mistake. You can do it with docker, but I prefer to setup a reverse proxy and get all my apps running with systemd services. It's really old school but I know I will only ever pay the cost of my VPS and if I want to scale, scaling vertically is effortless :p

CCHS
Автор

I removed the dependency on node by using the standalone tailwind command line tool. You could do the same in the container.

AMDevanney
Автор

A 25MB image is crazy good... You taught me about the "scratch" image, thanks!

tjblackman
Автор

Great video Cody! I have been subbed to you for a while since back in my node / react days but I like you have migrated most of my stuff to Go +Templ w/ HTMX! In fact I migrated all my old node heroku projects to Railway a few years ago too!

On a side note, I would love to see a video about your dev mode with air and all the cli tools you need to run to "hot reload" (tailwind, templ generate etc). I did have it set up at one point but it always seems like a PITA to set up for every project. Would love to see how you implement such a system!

ohLyln
Автор

Thinking of rewriting most of my django rest framework projects in Go. Just that there isn't any framework like Django for Go

ifeanyinneji
Автор

I think using node to compile your css is fine. It's not like you have it running all the time.

CCHS
Автор

I hope you to make tutorial or playlist about building project with go in the future.

eillioniscreating
Автор

Small tip: instead of prepending every statement in the Makefile, you can to `make -s ...` to make it "silent" (not echo the commands it runs)

farzadmf
Автор

You could use the Tailwind binary & add DaisyUI from CDN to remove npm entirely…..but it’s not fully tree shaken so the files are bigger than they need to be

coffeeintocode
Автор

I normally have a node layer that pulls from a node docker image like node:22 and a separate golang layer that builds go

cdotdev
Автор

Hey, You can reduce the size of executable binaries with UPX. The compression ratio is around 60% with UPX alone. UPX + Compiler options(-ldflags=“-s -w”) even more.

unisol
Автор

you are using fiber I see. Would be a good comparison between fiber and the std library to monitor the memory ussage

dejanduh
Автор

You may add one more build stage "FROM node" to save some apt install time.

_vicary
Автор

I saw you were using sqlite in a previous video. How do you deploy the db to railway?

Torboc
Автор

I don't think one could call this kind of stack simple as templ is a custom language and needs a build step. Similar to JSX but less integrated.

MrHamsterbacke
Автор

Do you use sqlite on railway and if so, do you mind explaining how?

leo
Автор

could do a video on an actual production ready auth in go? Would love to see that

fmentz
Автор

One thing I want to point out that code generation should not be part of build. You should commit generated go files.

abhinavadarsh
Автор

If you needed tailwind in htmx, without adding node to your containers, maybe use tailwind via cdn...

Am i right or am i missing something here?


Your styles are simple enough so why not.. and you dont look like someone who would have unused classes in his code

picklenickil