I am trying to get my sveltekit websocket app to run on IIS on my server running Windows server 2022. I cloned the project form this repository which uses the node ws library. After I build the project and run the preview version it works on my local machine. I think it has to do with the server.cjs file and the web.config file that I have in my build folder on the server, but I really do not know. I see there is a prodServer.ts that is in the root directory. I can not find any of this code in the build folders so It's possible that I need to put this folder or reference it in the build folder on my server. I appreciate any help or guidance in advance.
Also if someone has another working repo with websockets in sveltekit that they know will work with IIS I would love to see that project.
Server.cjs
process.env.SOCKET_PATH = process.env.PORT;delete process.env.PORTimport('./index.js')
web.config
<?xml version="1.0" encoding="utf-8"?><configuration><system.webServer><handlers><add name="iisnode" path="server.cjs" verb="*" modules="iisnode" /></handlers><rewrite><rules><rule name="node"><match url=".*" /><action type="Rewrite" url="server.cjs" /></rule></rules></rewrite><webSocket enabled="false" /><iisnode watchedFiles="web.config;*.js;*.cjs" /></system.webServer></configuration>