IIS

Deploy Nitro apps to IIS.

This is an experimental preset.

Preset: iis_node (switch to this preset)

  1. Install IISnode, and the IIS URL Rewrite Module.
  2. In IIS, add .mjs as a new mime type and set its content type to application/javascript.
  3. Deploy the contents of your .output folder to your website in IIS.

Using IIS directly

Preset: iis-handler (switch to this preset)

If you do not wish to use IISnode, you can use IIS directly.

  1. Make sure that Node.js is installed on your Windows Server.
  2. Make sure HttpPlatformHandler Module is installed.
  3. Copy your .output directory into the Windows Server, and create a website on IIS pointing to that exact directory.

IIS Config options

nitro.config.ts
export default defineNitroConfig({  // IIS options default  iis: {    // merges in a pre-exisiting web.config file to the nitro default file    mergeConfig: true,    // overrides the default nitro web.config file all together    overrideConfig: false,  },});
nuxt.config.ts
export default defineNuxtConfig({  nitro: {    // IIS options default    iis: {      // merges in a pre-exisiting web.config file to the nitro default file      mergeConfig: true,      // overrides the default nitro web.config file all together      overrideConfig: false,    },  },});