A
A
Alexey2018-12-23 21:10:10
Software Deployment
Alexey, 2018-12-23 21:10:10

Deploying a nuxt application to production?

Dear members of the forum, the question is of course utterly hackneyed, but I have not met a sensible answer. The bottom line is when I, for example, wrote an application on vue - I assembled a build, sent it for production. In my case, in general, ide is synchronized with the production server. Everything is transparent and simple, only assembly files get to the server and nothing more (no node_modules, configs, etc., etc.). In the case of nuxt, it is not clear, of course, after the build, it forms the dist folder, inside its giblets, namely /.nuxt/dist. Perhaps the destination directory can be changed, but this is not the problem. Everything is clear with the client side, but with the server side? There is nothing else in the server folder except html and json. There is nothing to run! And it seems to me that even if you roll up the entire .nuxt folder for prod, this will not help. All files in this folder that can be run on the node, pull a bunch of dependencies from the same /node_modules. That is, is it that it turns out that you need to upload everything to the server, along with the dev environment? And the only way to run ... Damn, not comme il faut! So I want to ask people who know about this issue, maybe I misunderstood something.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilabuse, 2019-02-08
@Sizex

If you are talking about deploying the application and so that there is no delay during the recompile to apply the change, then use PM2 with its clustering, create 5 clusters, and then just pm2 reload [app-name], and it restarts everything without delay so that if you proxy the node , and you proxy it so that clients do not see 502
I looked at everything here: https://github.com/nuxt/nuxt.js/issues/3078

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question