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

Server-side Injected Config Values #860

Open
dyc3 opened this issue May 1, 2023 · 2 comments
Open

Server-side Injected Config Values #860

dyc3 opened this issue May 1, 2023 · 2 comments
Labels
client Improvements or additions to the web client enhancement New feature or request help wanted Extra attention is needed server Improvements or additions to the server

Comments

@dyc3
Copy link
Owner

dyc3 commented May 1, 2023

Is your feature request related to a problem? Please describe.

We have configuration values that the server needs to convey to clients, like the short url. It would be nice if we could avoid a round trip to the server to get config values.

Describe the solution you'd like

When serving index.html, the server should inject some javascript to set config values in a global scope. The client, when loaded by a browser, should then take those values and put them in a vuex store.

Additional context

Requires #849
Related: #842

@dyc3 dyc3 added enhancement New feature or request server Improvements or additions to the server client Improvements or additions to the web client labels May 1, 2023
@dyc3
Copy link
Owner Author

dyc3 commented Jul 12, 2023

Currently, I'm liking ejs: https://github.com/mde/ejs

@dyc3
Copy link
Owner Author

dyc3 commented Jul 12, 2023

I've looked into this a little more, this is going to take a lot of effort, and it's somewhat unclear how vite will play into all of this. I don't currently see a way forward with this without rewriting the frontend to do proper SSR.

@dyc3 dyc3 added the help wanted Extra attention is needed label Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Improvements or additions to the web client enhancement New feature or request help wanted Extra attention is needed server Improvements or additions to the server
Projects
None yet
Development

No branches or pull requests

1 participant