Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help. bs can not work when i set socket.namespace like this. #621

Closed
xunuo opened this issue May 13, 2015 · 9 comments
Closed

help. bs can not work when i set socket.namespace like this. #621

xunuo opened this issue May 13, 2015 · 9 comments

Comments

@xunuo
Copy link

xunuo commented May 13, 2015

can not work when i set namespace like this.

socket: {
  namespace: function (namespace) {
    return "localhost:3000" + namespace;
  }
}

@Version 2.7.1

@xunuo
Copy link
Author

xunuo commented May 14, 2015

gulp.task('default', function() {
    browserSync.init({
        host: "192.168.1.110",
        files: "*.html",
        server: {
            baseDir: "./",
            directory: true,
            host: "192.168.1.110"
        },
        open: false,
        scriptPath: function (path, port, options) {
            return options.get("absolute").replace('HOST','192.168.1.110');
        },
        socket: {
            path : '/ooooo.io',
            clientPath : '/short',
            // issue: bs can not work when i set namespace like this.
            namespace: function (namespace) {
                return "localhost:3000" + namespace;
            }
        }
    });
});

@xunuo
Copy link
Author

xunuo commented May 14, 2015

hello,help.

@shinnn
Copy link
Contributor

shinnn commented May 15, 2015

What do you mean by "cannot work"?

@xunuo
Copy link
Author

xunuo commented May 15, 2015

Hello, that's mean 'no browser-sync layer appear at top right corner'.

@xunuo
Copy link
Author

xunuo commented May 19, 2015

hello,help.

@shinnn
Copy link
Contributor

shinnn commented May 22, 2015

@shakyShane Thoughts?

@shakyShane
Copy link
Contributor

A fix will land soon 5157432

@shakyShane
Copy link
Contributor

Fixed in v2.7.13

The original implementation was completely broken (where setting the namespace allowed a url, doh!).

now, to achieve what you want, it's the domain property you want.

socket: {
    domain: "localhost:3000"
}

please also see #690

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants