Tag Archives: client

WebSockets – HTML5


WebSockets is an advanced technology that makes a bidirectional communication between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. Socket connection is a persistent connection between the client and the server and both parties […]

https://davisonjoseph.wordpress.com/2015/07/14/websockets-html5/

WebSockets – HTML5


WebSockets is an advanced technology that makes a bidirectional communication between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. Socket connection is a persistent connection between the client and the server and both parties […]

https://davisonjoseph.wordpress.com/2015/07/14/websockets-html5/

A component that provides router related functionalities for both client and server.


Routr Build Status Dependency Status Coverage Status

Routr library is an implementation of router-related functionalities that can be used for both server and client. It follows the same routing rules as Express by using the same library. This library does not use callbacks for routes, instead just mapping them to string names that can be used as application state and used within your application later. For instance in Flux, the current route would be held as state in a store.

Usage

For more detailed examples, please check out example applications;

var Router = require('routr'),
    router,
    route,
    path;

router = new Router({
    view_user: {
        path: '/user/:id',
        method: 'get',
        foo: {
            bar: 'baz'
        }
    },
    view_user_post: {
        path: '/user/:id/post/:post',
        method: 'get'
    }
});

// match route
route = router.getRoute('/user/garfield');
if (route) {
    // this will output:
    //   - "view_user" for route.name
    //   - {id: "garfield"} for route.params
    //   - {path: "/user/:id", method: "get", foo: { bar: "baz"}} for route.config
    console.log('[Route found]: name=', route.name, 'params=', route.params, 'config=', route.config);
}

// generate url path from route
// "path" will be "/user/garfield/post/favoriteFood"
path = router.makePath('view_user_post', {id: 'garfield', post: 'favoriteFood'});

License

This software is free to use under the Yahoo! Inc. BSD license. See the LICENSE file for license text and copyright information.

Third-pary open source code used are listed in our package.json file.