Connecting NodeJS app to SignalR (with .NET Core 3)

I have a server running SignalR using .NET Core 3. The project was started with the template and I followed a guide (https://docs.microsoft.com/en-gb/aspnet/core/tutorials/signalr?tabs=visual-studio&view=aspnetcore-3.0). I have created a clone of the project, and can successfully connect to the server and can receive messages as expected. This also means I added CORS. I want to be able to use SignalR in a Node JS environment, but the connection stucks at “Negotiation” I have created a brand new folder, ran npm init -y and npm i @microsoft/signalr. Created a new js file called main.js, which looks like this: after running it with node