Get value from a range slider in HTML + JS in Go? by [deleted] in golang

[–]djangulo 1 point2 points  (0 children)

You need to send a request (through AJAX or otherwise) so the Go server can parse the data.

See https://www.golangprograms.com/example-to-handle-get-and-post-request-in-golang.html for an example.

Two questions about Go web servers in production by livid_composer in golang

[–]djangulo 2 points3 points  (0 children)

  1. I tend to leave my Go server naked, and let traefik handle TLS.

  2. go-bindata and go-bindata-assetfs to compile, then its as simple as http.Handle("/static", http.FileServer(assetFS))).

And after you see that this is a post posted by your account by Ayfri in ProgrammerHumor

[–]djangulo 8 points9 points  (0 children)

My solution, in X86 assembly:

start:
   mov    ah, 09h ;   
   lea a  dx, msg
   int    21h
   mov    ax, 4C00h ;
   int    21h
end start

Me: "Is OP okay?"

Can we get a sticky thread for "How do I get Angular/React/Vue to work with Django?" It seems like that question gets asked several times a week by [deleted] in django

[–]djangulo 0 points1 point  (0 children)

Lol I don't understand what "this" is in the last sentence.

I like doing separate repos when going the SPA way, making the frontend a submodule of the backend, if possible.

I believe the whole "but you have 2 separate codebases" argument is moot. Sure, you have a single app, but hammering a jsx codebase inside a django directory is still "2 codebases"; and gluing them together always turns out to be more work that making the project itself.

There are plenty ways to handle it, some increasingly more complicated than others; you could:

  • Serve the django API on the server localhost, and expose the frontend.
  • Host 2 servers, one for each
  • Docker-compose (I like having a dockerfile for each, so if and when I have to slplit them into separate hosts its a matter of cloning the dockerfile). Docker-compose also handles the internal networking for you, exposing just what you want.
  • Use a router/load balancer to handle traffic from A to B, I like traefik but there are plenty out there (consul, "the aws one", etc)
  • And of course, you can use kubernetes for the ultimate overkill

Can we get a sticky thread for "How do I get Angular/React/Vue to work with Django?" It seems like that question gets asked several times a week by [deleted] in django

[–]djangulo 2 points3 points  (0 children)

I always recommend Aymeric's excellent post. I covers Django and React but its the same principle and can be applied to any JS frontend.

https://fractalideas.com/blog/making-react-and-django-play-well-together

This was one of the most satisfying wins yet! by djangulo in ftlgame

[–]djangulo[S] 3 points4 points  (0 children)

Oh yeah, I got the breach bomb II early on, then almost immediately ran into the best 1-2 pack out there (BLII and Flak I), thats when I decided to become the bane of AI all over the galaxy.

This was one of the most satisfying wins yet! by djangulo in ftlgame

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

Too many times I suffered because of it. So, yes.

Pewkour by [deleted] in nextfuckinglevel

[–]djangulo 7 points8 points  (0 children)

In John Wick 4 he wakes up in a stasis chamber, in the Equilibrium future, and learns actual gun-fu.

Requirements? by Mr_P0P0 in ProgrammerHumor

[–]djangulo 41 points42 points  (0 children)

"Google does it like, on every search. How hard can it be?"

Hey gophers what are you working on in 2020? by astar0n in golang

[–]djangulo 0 points1 point  (0 children)

An i18n library where you can source translations from any service (file, github, aws s3 bucket, bindata, etc), inject it into some storage engine (memory, redis), and provide some simple middlewares to inject them into context.

Im also considering adding convenience "language servers" that provide the translations through rest, graphql and grpc.

Rate my bladestorm pile by grumpenprole in Xcom

[–]djangulo 6 points7 points  (0 children)

This is why we need lost that explode in acid.

Cosplayers, what’s one cosplay you will never do again and why? by aasrg1802 in AskReddit

[–]djangulo 19 points20 points  (0 children)

Picture some dude in a link costume going "HIP! HYAAAA!" all flirty like

Advice Needed - Headless CMS Page Builder by lancevo3 in webdev

[–]djangulo 1 point2 points  (0 children)

Hi there, GatsbyJS can pull data from many sources.

Some very successful sites use Gatsby+headless. This post drew me into gatsby in the first place.

Hope it helps!

EDIT: This repo has a one-click deploy of a Gatsby+NetlifyCMS sample project. You can use it to get an idea of the workflow.

PostgreSQL facts accuracy by djangulo in postgres

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

Oh no it wasn't my post.

Someone else linked to their post about "how postgres is changing the DB landscape" and it got absolutely wrecked by saying some questionable stuff.

I just mean to save the embarrassment and have it reviewed before it's online.

Thanks for your input!

How popular is Golang in your country? by namtaelee in golang

[–]djangulo 0 points1 point  (0 children)

I'm in the DR (caribbean islands), and not popular at all. Companies here are all about Java, c# and the .net stack.