Skip to content
Discussion options

You must be logged in to vote

yes, you can reuse your express + vue ssr setup. render the requested url when the request arrives, rather than generating a file for every possible url

your express handler already fetches the blog data for metadata, so i'd pass that same result into the vue page. mounted() doesn't run during ssr, which leaves that client-fetched content out of the server html

for each dynamic-page request:

  1. create a fresh app, router and state to avoid leaking data between requests. use createMemoryHistory() on the server, install the router, then await router.push(req.originalUrl) and await router.isReady()
  2. reuse the blog fetch, or fetch the profile in the handler. put the result into that request's st…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AnkitaKhokhar-1
Comment options

Answer selected by AnkitaKhokhar-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants