IIS
Deploy Nitro apps to IIS.
This is an experimental preset.
Using IISnode (recommended)
Preset: iis_node
(switch to this preset)
- Install IISnode, and the IIS URL Rewrite Module.
- In IIS, add
.mjs
as a new mime type and set its content type toapplication/javascript
. - 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.
- Make sure that Node.js is installed on your Windows Server.
- Make sure
HttpPlatformHandler
Module is installed. - 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, },});
Table of Contents