Skip to content

Failing without any errors. #1

@Arduinology

Description

@Arduinology

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions