mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-30 11:00:35 -06:00
* better explain contributing to the driver - update npm tasks to reflect newest conventions * better explain contributing to the desktop-gui - update npm tasks to reflect newest conventions * synchronize content changes * capitalize all package readme's for consistency * better explain contributing to the runner, synchronize content changes * better explain contributing to the server * synchronize content * synchronize content * synchronize content * synchronize content * synchronize content * synchronize content * better contribution guidelines by redirecting users to package specific readme's * synchronize content * fix various content mistakes * simplify contributing * removed dead files * bump zunder * lock zunder to 5.1.0
Socket
This is a shared lib for holding both the socket.io server and client.
Usage
var socket = require("packages/core-socket")
// returns
{
server: require("socket.io"),
client: require("socket.io-client"),
getPathToClientSource: function () {
// returns path to the client 'socket.io.js' file
// for use in the browser
}
}
var socket = require("packages/core-socket")
// server usage
var srv = require("http").createServer()
var io = socket.server(srv)
io.on("connection", function(){})
// client usage
var client = socket.client("http://localhost:2020")
client.on("connect", function(){})
client.on("event", function(){})
client.on("disconnect", function(){})
// path usage
socket.getPathToClientSource()
// returns your/path/to/node_modules/socket.io-client/socket.io.js0
Install
The sockets's dependencies can be installed with:
cd packages/socket
npm install
Testing
npm test