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

Fix Frontend NextJS deployment #8

Open
dmitri-mcguckin opened this issue Jan 12, 2025 · 0 comments
Open

Fix Frontend NextJS deployment #8

dmitri-mcguckin opened this issue Jan 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@dmitri-mcguckin
Copy link
Member

dmitri-mcguckin commented Jan 12, 2025

After some dinking around with the frontend I've come to understand why embedding the environment variables into the NextJS app is necessary (for now).

This is because NextJS builds a static set of JS pages and then serves those to the end-user (web browser).

At-present, the pages are served via yarn. This is technically incorrect to package and serve content this way as yarn is just a dev tool with many dev hooks and handles embedded in the content for debugging.

Instead, we should be using a WSGI library to have the "back" of the frontend serving via our own minimized WSGI code. With this, we should be able to pull any environment variables we need and adjust the content that gets served (content with calls to the api url) and be able to properly and dynamically serve the right content.

@dmitri-mcguckin dmitri-mcguckin added the enhancement New feature or request label Jan 12, 2025
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