Skip to content

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DragonNode.js Socket.IO

Bundle with services to develop applications with Socket.IO

  • Initialize Socket.IO service to define endpoints for Socket.IO communication
  • Initialize namespace service to support Socket.IO with namespacing and middlewares
  • Services for validate input from the clients

Installation

  • Add bundle to the "package.json":
{
    "dependencies": {
        "dragonnodejs-socket.io": "^2.1.4"
    }
}
  • Run "npm install"
  • Extend the configuration in "app.js":
var config = {
    modules: {
        npm: [
            [require('dragonnodejs-socket.io'), {
                io: { port: process.env.PORT },
                namespace: { delimiter: ':' },
                validate: function (validator) {
                    return {
                        emailaddress: function (input) {
                            input = validator.trim(input);
                            if (!validator.isEmail(input)) {
                                throw new Error('invalid emailaddress');
                            }
                            return input;
                        }
                    };
                }
            }]
        ]
    }
};

About

Bundle with services to develop applications with Socket.IO

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages