I using a angulajs as frontend and node.js REST API as backend both our on different server. I want to use socket.io, but enable to get socket.io.js file on client from the node.js server i am using
<script src="http://localhost:3000/node_modules/socket.io/socket.js"></script>
to get the socket.io file.
Error: GET "localhost:3000/node_modules/socket.io/socket.js "
I highly recommend taking a look at this library: https://github.com/btford/angular-socket-io
This way you can easily integrate socket.io with Angular for client side
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.