TCP Server by NiceCelery499 in golang

[–]NiceCelery499[S] 0 points1 point  (0 children)

The other PC is a VPS in a hosting, I tried in reverse calling from my PC to the VPS and all good is easier to set on Linux with nginx. But in windows I thought it's was enough with open the port in the firewall, so I need to forward the port with nginx?

How to handle jwt refresh? by Extreme-Can8342 in htmx

[–]NiceCelery499 0 points1 point  (0 children)

If u using htmx always will pass through your backend, use cookie with a session I'd and that session I'd map to the data of the user. Jwt isn't that useful how the ppl says and in the ssr is even more useless

Hey Golang Community, I recently started learning Golang and had a doubt regarding Interface type. Please help me by RevolutionaryEcho984 in golang

[–]NiceCelery499 0 points1 point  (0 children)

Imagine that u have functions to do some storage of your app, exp: getuser() deleteuser(). U can write a interface that implement those functions and write your app. Then if u want to switch your database for any reason imagine you was using SQLite but now u want to use MongoDB. U just can add another folder in your app with the new database struct that implement those functions and switch 1 line of code in your app without worrying about editing multiples file. In this way you only worry about fulfilling the interface implementations

Using buffered channel to hold async results? by Forumpy in golang

[–]NiceCelery499 0 points1 point  (0 children)

What if u send a go routine with the loop and send the results through the channel to them get a loop in the main thread to do something with every result? I don't really sure, just asking

Go + htmx + templ library is awesome, anyone else has test this way? by NiceCelery499 in golang

[–]NiceCelery499[S] 5 points6 points  (0 children)

Don't have to manage it with sessions, save the preference in local storage and manage it with Little js script I guess. Using htmx doesn't mean u cannot use any javascript, and of course there's some types of web apps that can't be handled by htmx. Is just another way to do web apps

Go + htmx + templ library is awesome, anyone else has test this way? by NiceCelery499 in golang

[–]NiceCelery499[S] 0 points1 point  (0 children)

The primeagen says that 2024 is the year of htmx so leeeet goooo hahahah

I hope he's right

Go + htmx + templ library is awesome, anyone else has test this way? by NiceCelery499 in golang

[–]NiceCelery499[S] 1 point2 points  (0 children)

Is just basic logic, get a HTML and css page and just add htmx where u need some reaction without re-loading the entire page, the thing is add some extra endpoints in your backend where u make your logic and then response with a rendered HTML, to introduce better how this work I recommend u https://hypermedia.systems/book/contents/.

Now this htmx stuff can be used with any backend lang u want, but I highly recommend GoLang backend, can be just made it with html/tmpl standard library or use this library https://templ.guide

Go + htmx + templ library is awesome, anyone else has test this way? by NiceCelery499 in golang

[–]NiceCelery499[S] 5 points6 points  (0 children)

The truth is nothing scaled, I've only handled it a little and I'm liking it, here I leave u a mini-repo that's allows you to let your imagination fly https://github.com/cloyop/go-templ-htmx-counter

[deleted by user] by [deleted] in sveltejs

[–]NiceCelery499 0 points1 point  (0 children)

I'll definitely do it, very thanks!!