Want to take a look at our new docs? Our new docs are now in beta. Have fun!

How to deploy with Surge?

Nuxt.js gives you the possibility to host your web application on any static hosting like Surge for example.

To deploy on Surge, first install it on your computer:

npm install -g surge

Then, we tell Nuxt.js to generate our web application:

npm run generate

It will create a dist folder with everything inside ready to be deployed on a static hosting.

We can then deploy it to Surge:

surge dist/

Done :)

If you have a project with dynamic routes, take a look at the generate configuration to tell Nuxt.js how to generate these dynamic routes if you are using Nuxt <= v2.12.

When generating your web application with nuxt generate, the context given to asyncData and fetch will not have req and res.


Contribution for this page is now closed. If you would like to contribute please check out our new docs are now in beta. Have fun!

Platinum Sponsors

StoryblokMoovweb Support Us