Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Golang to Serve Frontend Assets (like React) instead of Node.Js #339

Open
1 task done
EarliestFall988 opened this issue Nov 22, 2024 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@EarliestFall988
Copy link

Tell us about your feature request

I work on projects that require pretty high security standards, and I have yet to get Node.Js pushed through (maybe Deno in the future??). Has anyone tried deploying go-blueprint with React and without Node - letting Golang serve the frontend assets instead?

This would be similar to the official React + ASP.NET or Vue + ASP.NET templates. Vite becomes a proxy server during development for DX reasons (HMR, tailwind, etc.). When it's time to deploy, Vite builds the frontend assets into a public folder, which Golang picks up and serves. All API endpoints will get served through 'https://example.com/api/' (it would feel kinda like Next.Js).

It could simplify the deployment story because you wouldn't necessarily need docker-compose just to serve HTML/CSS/JS assets. One Golang server would do all the work, and latency could be reduced (depending on how the project is deployed).

Deploying without Node means you can't deploy any server-side JS packages. But go-blueprint is a Golang backend project - if you're deploying backend JS, you're probably doing it wrong.

If this seems interesting, I am happy to tinker and create a PR, but I don't want to expand this project's scope because of a specific deployment opinion or security need.

Any thoughts?

Huge fan!! Go Blueprint is incredible!!

Disclaimer

  • I agree
@EarliestFall988 EarliestFall988 added the enhancement New feature or request label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant