←back to thread

153 points yar-kravtsov | 1 comments | | HN request time: 0s | source

I built a Vite plugin that lets you write Go code directly in .js files using a "use golang" directive. It compiles to WebAssembly automatically.
Show context
liampulles ◴[] No.45719276[source]
Just be careful with this backend-code-in-frontend stuff. If it's needed for some computationally expensive logic that is logically client side, then fine. But be wary of letting the client dictate business rules and having open-for-anything APIs (GraphQL is particularly prone to this).

I've seen teams do this in the wild more than once.

replies(3): >>45720892 #>>45721373 #>>45724829 #
1. rs186 ◴[] No.45721373[source]
Well, the "Is this a good idea?" section in the README already addresses the issue.