I'm trying to follow this documentation for setting up the clientside of a project using signalr. So I have a asp.net core mvc project, and I start by running these commands in the nuget package manager command line:
npm init -y
npm install @microsoft/signalr
After doing this, the documentation has this text:
npm installs the package contents in the node_modules\@microsoft\signalr\dist\browser folder.
Create a new folder named signalr under the wwwroot\lib folder. Copy the signalr.js file to the
wwwroot\lib\signalr folder.
This part is super confusing to me. I don't know where node_modules\@microsoft\signalr\dist\browser
directory is, I cannot find anything called node_modules. Then it also says that I should Copy the signalr.js file
, that's also confusing. I have no such file anywhere in the project, I don't know where to copy from.
After this, the documentation says another thing which is pretty confusing:
Reference the SignalR JavaScript client in the <script> element. For example:
<script src="~/lib/signalr/signalr.js"></script>
This does'nt make to much sense to me. Where should I put this tag? In all view files in my project? perhaps in a word file on my local pc?
I really hope someone can help clearing these things up.