Nuxt3 中文课程《实战全栈开发简书》限时优惠
Deploy

Heroku

Deploy your Nuxt Application to Heroku infrastructure.

Nuxt supports deploying on Heroku with minimal configuration.

Using the Heroku CLI

  1. Create a new Heroku app.
    Terminal
    heroku create myapp
    
  2. Configure Heroku to use the nodejs buildpack.
    Terminal
    heroku buildpacks:set heroku/nodejs
    
  3. Configure your app.
    Terminal
    heroku config:set SERVER_PRESET=heroku
    
  4. Ensure you have start and build commands in your package.json file.
    package.json
    {
      "scripts": {
        "build": "nuxt build",
        "start": "node .output/server/index.mjs"
      }
    }
    

Learn more

Head over Nitro documentation to learn more about the Heroku deployment preset.