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

Failing without any errors. #1

Open
Arduinology opened this issue May 31, 2014 · 1 comment
Open

Failing without any errors. #1

Arduinology opened this issue May 31, 2014 · 1 comment

Comments

@Arduinology
Copy link

I have a fresh Laravel installation, the only thing I have done is added BrainSocket as detailed in the documentation and enabled restful controllers and set a route to the HomeController. The "You have arrived" view is returning as intended, the BrainSocket.js is loading without errors, and the BrainSocket object seems to load with no errors in the web console, brainsocket server, or php logs. When the following code is added to my hello.php view I can no longer get console.log()'s to show in the web browser of the client.

<script type="text/javascript" src="js/brain-socket.min.js" />
<script type="text/javascript">

    window.app = {};

    app.BrainSocket = new BrainSocket(
            new WebSocket('ws://localhost:8080'),
            new BrainSocketPubSub()
    );
    app.BrainSocket.Event.listen('some.event',function(msg)
    {
        console.log(msg);
    });

    app.BrainSocket.Event.listen('app.success',function(msg)
    {
        console.log(msg);
    });

    app.BrainSocket.Event.listen('app.error',function(msg)
    {
        console.log(msg);
    });
    console.log("test");
</script>

What do you suggest I do?

System Specs
CentOS 6.5
PHP 5.5.12
Apache 2.2.15
Laravel 4

@Arduinology
Copy link
Author

Nevermind, just had to use Blade syntax to include the JavaScript reference.

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

1 participant