.NET Core 2.1 Signalr WebSocket and Angular 6 client.
- Node 10.8.0
- npm 6.2.0
- Global: @angular/cli@6.1.2
- dotnet 2.1.302
Run server as a console application with the port 8060. If you choose to use a different port, you must update the port on the client side as well which can be found here.
Install node packages and run on port 4200. If you want to run the client on a different port, you must update the port found here.
ng cli is configured to output build to wwwroot on the Server.
# Install packages
cd Client/
npm i
# Build prod
ng build --prod
# Assuming you are still in Client
cd ../Server
dotnet build -c Release
# Use sudo for running on port 80
sudo dotnet bin/Release/netcoreapp2.1/WebSocket.Server.dll
If you are using windows, run PowerShell as admin and use the same command as above without sudo:
dotnet Server/bin/Release/netcoreapp2.1/WebSocket.Server.dll