How do I upload a Nuxt project to a server? (Namecheap)

Asked

Viewed 236 times

0

personnel what files of a project in nuxt I must go up to a server, in case I use the Namecheap.

surrounded the npm run build (on my machine), and a folder /dist was created inside the folder .nuxt

I read the documentation and some things about it but I really don’t understand yet how I should proceed.

  • It all depends on your architecture and the Nuxt mode you are using. Here we upload all the files and run npm run build and npm start with Jenkins.

  • got it. I’m using it in universal mode (ssr). but do you go up all the files and folders even? (/.nuxt, /Assets, /Components, /layouts, etc...). you spin npm run build still on the machine to create the dist folder inside . nuxt or only run this command after uploading everything to the server?

  • In our architecture we upload everything to a git server and Docker takes the application and runs one npm install, npm run build and npm start. But I recommend you take a look here. As I understand the architecture of Nuxt, you will only need the folder .nuxt

1 answer

0

Usually I use npm run generate, it generates static files in the dist folder, and these files I put into a hosting.

You can use the npm run build also, but it will generate the minified files.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.