javascript - How to include socket.io script in my HTML page? -
i trying use socket.io @ node.js having trouble setting up.
i installed socket.io node module node by:
npm install socket.io my node working , getting message info - socket.io started @ node start. socket @ node listens same port http server on node. problem setting client system.
all tutorials have referred on internet work under assumption client file , node file (i.e. html file , node.js file) in same directory , include socket.io script in html by:
<script src="/socket.io/socket.io.js"></script> but system setting have separate directories node , client namely nodejs , web (i using nginx websocket). socket.io node module inside node_modules directory under nodejs directory. how include socket.io script in client html? should copy socket.io node module files in web folder well?
Comments
Post a Comment