meteor - MeteorJS and Iron:Router error with WebSocket -
i'm using meteorjs iron:router on windows 8.1, i've created simple meteor project , added iron:router library, copy example (router controller) throws error.
layot.html
<head> <title>route_controllers</title> </head> <body> </body> <template name="applayout"> <div class="container"> <nav> <ul> <li><a href="/posts">/posts</a></li> </ul> </nav> <article> {{> yield}} </article> </div> </template> <template name="home"> <h1>home</h1> </template> <template name="postindex"> <h1>post index</h1> </template>
layout.js
router.route('/', { name: 'home' }); router.route('/posts', { controller: 'postcontroller', action: 'index' }); if (meteor.isclient) { applicationcontroller = routecontroller.extend({ layouttemplate: 'applayout', onbeforeaction: function () { this.next(); }, }); homecontroller = applicationcontroller.extend({ action: function () { this.render('home'); } }); postcontroller = applicationcontroller.extend({ index: function () { this.render('postindex'); } }); }
console.error:
websocket connection 'ws://localhost:3000/sockjs/034/68ih8b52/websocket' failed: error during websocket handshake: invalid status line
Comments
Post a Comment