Skip to content

Conversation

pi0
Copy link

@pi0 pi0 commented May 13, 2019

Hi. Thanks for this clean repo. Here is the summary of changes:

  • Update to nuxt@2.x
  • Use nuxt-start dependency for deployment which is 8.6M install size comparing to nuxt (71.8M)
  • No need to wrap SSR renderer to express
  • Await for nuxt.ready() which is essential for nuxt2
  • Don't prefix publicPath. Assets are fully hashed so no conflict should happen between deployments. It also makes this example simpler.
@bsthomsen
Copy link

@pi0 wouldn't still be nice to use express server to serve the static files like js that has already been generated during npm run build. And to control the headers etc with something like helmetjs?

And any reason you disable gzip compression?

@pi0
Copy link
Author

pi0 commented Jul 6, 2019

  • Using custom server is going to be discouraged soon. Express has unnecessary overhead and headers are still configurable using nuxt config / middleware
  • For gzip it would be better that reverse proxy layer handle it for faster SSR and less cost
@bsthomsen
Copy link

@pi0 cool, getting some strange error though disabling the gzip compression. One of the bundled files keeps giving 502. And besides this it doesn't output errors to the cloudwatch logs, is it because nuxt-start in production chokes all the errors?

@pi0
Copy link
Author

pi0 commented Jul 11, 2019

@bsthomsen there is no logging difference between nuxt and nuxt-start (just no builder dependencies). Would you please try adding this to entry point? That may help to debug the issue.

 process.on('unhandledRejection', (err) => { console.error(err) })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants