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

Popular posts from this blog

Change the color of an oval at click in Java AWT -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -