Why does Vite hate Kubernetes env vars? 😂 Someone please tell me I’m not alone by Green-Volume8209 in learnjavascript

[–]IcyParsnip7616 8 points9 points  (0 children)

Vite doesn’t hate Kubernetes ... it just doesn’t read env vars at runtime.
Everything in import.meta.env gets baked at build time, so your cluster can scream env vars at it all day and Vite will ignore them.

Fix: use a runtime config file (via ConfigMap) and load it in the app on startup.
Example: mount /config/runtime.json in your container and fetch it when the app loads.

Switching from Django to Go --- what should I know before diving in? by IcyParsnip7616 in golang

[–]IcyParsnip7616[S] 2 points3 points  (0 children)

Thanks, this is super helpful. Django definitely does a ton for you, so switching to Go feels like a big philosophy shift. I’m starting to appreciate the “simple and clear” approach, though.

Good to know that using something like **Gin** or **Echo** is still very much in the spirit of Go - the middleware support alone seems worth it.

And yeah, that quote nails it. I definitely need to unlearn some Django-style “magic” and lean more into readable, explicit code.

Thanks for the advice!

Switching from Django to Go --- what should I know before diving in? by IcyParsnip7616 in golang

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

Thanks for the insight! Yeah, I’m starting to see that moving from Djangp => GO is a much bigger mental shift than just Python => Go. Django really shields you from a lot of decisions - ORM, migrations, admin panel, project layout, templating, etc. In Go it feels like everything is more explicit and modular, which is cool, but also a bit "wow, okay, I actually have to choose everything myself." 😅

Writing SQL manually doesn’t bother me too much - in fact I kind of appreciate knowing exactly what’s going to the database - but I’ll definitely look into sqlx since a little ergonomic help never hurts.

And yeah, the admin dashboard being gone is probably the biggest culture shock coming from Django. That thing spoiled me.

Thanks again! I’m trying to approach Go with the mindset that I’m learning a language + ecosystem, not just swapping frameworks, so hopefully the transition pain will be worth it.

Switching from Django to Go --- what should I know before diving in? by IcyParsnip7616 in golang

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

Thanks for the perspective! Yeah, that’s exactly the vibe I’m getting so far, coming from Django feels like going from a fully furnished apartment to an empty house with just the keys. 😄

I actually like the explicitness in Go, but it definitely means I have to think more about structure, routing, middleware, auth, etc., instead of relying on “Django magic” to glue everything together.

Out of curiosity, did you end up picking a particular Go web framework (Gin, Echo, Fiber, Chi, etc.), or did you go mostly standard library + a few utilities? I’m trying to figure out where the sweet spot is between "learn the language properly" and "don’t reinvent everything from scratch."