How can I publish my Nuxt app in Bluehost

204 Views Asked by At

I want to publish my site in Bluehost. When I generate the production site with yarn build, and then accessing the .nuxt directory to copy all the contents to my bluehost html folder I get just plain text and not the Running site as you can see here.
tecnoeducacion.online

Please tell me if there are more configuration steps before yarn build

2

There are 2 best solutions below

0
kissu On BEST ANSWER

yarn generate is for SSG (target: 'static'), if you want to host some static files. It's basically JAMstack and hostable on Github pages/Netlify/Heroku etc.
More info here: https://nuxtjs.org/docs/concepts/static-site-generation

yarn build is for SSR (target: 'server'), it requires a Node.js server and will generate all the pages on demand on the server.
More info here: https://nuxtjs.org/docs/concepts/server-side-rendering

0
FerchoCarcho On

I had to Yarn Generate, instead of Yarn build, to make it work, but would be good if anybody could explain the difference of one to the other command