How to deploy nuxt.js project on shared hosting?
Asked Answered
U

2

5

Is it possible to deploy nuxt-js spa project in shared hosting like hostgator through cpanel?

I have tried several time to run below command, it's generate dist folder but didn't work.

My command: npm run build

Can you help me please?

Unfolded answered 25/4, 2018 at 11:29 Comment(1)
post the details of nuxt.config.js fileIggy
R
8
npm run build
Builds files for `npm run start` serving. And looks like you want it to be static files, which you just upload to hosting. So you should run:
npm run generate
then in `/dist/` you will find static spa.
Raynold answered 10/1, 2019 at 11:52 Comment(0)
C
0

Yes, it is possible to deploy Nuxt SPA to shared hosting. You can follow the official documentation of Nuxt.

Step by step to get the file of generate:

  • npm run build
  • npm run generate
  • the result generated you can see in the folder /dist all assets of the folder dist can be uploaded/deploy to your shared hosting.

Thank you maybe can help.

Carolynecarolynn answered 6/9, 2023 at 3:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.