Skip to content

Commit

Permalink
fix(iis-node): pass PORT as NITRO_UNIX_SOCKET (#1783)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Oct 3, 2023
1 parent 5fa80a7 commit f5bb6b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/presets/iis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ export const iisNode = defineNitroPreset({

await writeFile(
resolve(nitro.options.output.dir, "index.js"),
"import('./server/index.mjs');"
`
if (process.env.PORT.startsWith('\\')) {
process.env.NITRO_UNIX_SOCKET = process.env.PORT
delete process.env.PORT
}
import('./server/index.mjs');
`
);
},
},
Expand Down

0 comments on commit f5bb6b4

Please sign in to comment.