Angular-RU/universal-starter

Prerender deploy

adamgasiorek opened this issue · 2 comments

How can i deploy website using yarn build:prerender ?

build all your path of the app.
Then you need to deploy like the static site(nginx)

@Gorniv can you please be more specific

  1. npm run build:universal
  2. npm run build:prerender
  3. which folders need to be copied to static web server? (e.g. I see static, dist, and dist-server beeing generated ...) Also, any specific rule where should I put them?

What I am looking for is a single dist folder with html files for each path in static.paths.ts as well as javascript sources for transition to the angular app once the app is loaded on the client. For instance, in https://github.com/angular/universal-starter/blob/master/package.json I was able to achieve that by running npm run build:prerender && npm run serve:prerender