Friday, 27 November 2015 android.

If you google android, you will find two libs, one is the offical lib:

1. However, this lib doesn't support customized url. it will ignore your url and use the root url:

if you use http://localhost:9000/

it will automatically use http://localhost:9000/, because this is the default socketio url.

2. ngrok doesn't support, please don't use ngrok .

3. if you use angularjs fullstack, please change your url (as issue 1 mentioned.), you need change two place:

   1> The client service: (client/components/socket/socket.service.js)

    change path: '/'  to path: '/'

   2> The server  (server/app.js)

   change path: '/'  to path: '/

   3> change the link to:  <script src=""></script> and move it out of <!-- endbuild --> don't do js minify for it.

4. doesn't supoort https very well. to be safe, you should use http.

5. serveClient: true is very important. you should always set this as true.

var socketio = require('')(server, {
  // serveClient: (config.env === 'production') ? false : true,
  serveClient: true,

Because this means the is not a static file, it is a runtime supported js.  "serveClient" is the flag for supporting this js runtime.

Your html links the to this link but it is not exist when you compile it. so the file will not be able to be minifyed.  (so you have to move this link out of js minify this is point 3. 3>)

No comments:

Post a comment