https://github.com/scriptollc/karma-socketio-server
A socketio server framework plugin for karma
https://github.com/scriptollc/karma-socketio-server
Last synced: 8 months ago
JSON representation
A socketio server framework plugin for karma
- Host: GitHub
- URL: https://github.com/scriptollc/karma-socketio-server
- Owner: scriptoLLC
- License: other
- Created: 2015-12-05T00:09:20.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-02-13T00:10:10.000Z (over 7 years ago)
- Last Synced: 2025-06-01T17:27:06.096Z (about 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# karma-socketio-server
Make it easy to start up a socket.io server during karma tests
## Installation
```shell
npm install --save-dev karma-socketio-server
```
## Usage
```js
module.exports = function (config) {
// your karma config goes here
socketioServer: {
port: 9999, //default port unless you set something different
onConnect: function (socket) {
// do something with the connected client
socket.on('message', function (msg) {
console.log('i got a message!', msg)
})
},
ready: function (io) {
// do something with the socket.io instance
}
},
frameworks: ['socketio-server']
}
```
## Thanks
Thanks to [karma-websocket-server](https://github.com/weblogixx/karam-websocket-server) for the template on how to do this
## License
Copyright (c) 2015 Scripto; [Apache 2.0](License)