Skip to content

Commit

Permalink
Test fixed.
Browse files Browse the repository at this point in the history
There seems to be an issue with the latest version of
isparta-instrumenter-loader. So, for now, we are on v0.2.3
  • Loading branch information
Dindaleon committed Jan 1, 2016
1 parent 4e37479 commit b1e2a4b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
11 changes: 6 additions & 5 deletions karma.config.js
Expand Up @@ -2,9 +2,6 @@
/* jscs: disable */

// Karma configuration

var webpack = require('webpack');

module.exports = function(config) {
config.set({

Expand Down Expand Up @@ -55,8 +52,12 @@ module.exports = function(config) {
loaders: [
{
exclude: /node_modules/,
loader: 'babel-loader',
test: /\.js?$/
loader: 'babel',
test: /\.js?$/,
query: {
presets: [ 'es2015', 'react', 'stage-0' ],
plugins: [ 'transform-decorators-legacy', 'transform-runtime' ]
}
}
]
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -105,7 +105,7 @@
"extract-text-webpack-plugin": "^0.9.1",
"hapi-webpack-plugin": "^1.2.1",
"isparta": "^4.0.0",
"isparta-instrumenter-loader": "^1.0.0",
"isparta-instrumenter-loader": "^0.2.3",
"istanbul": "^0.4.0",
"jscs": "^2.3.2",
"json-loader": "^0.5.3",
Expand All @@ -121,7 +121,7 @@
"mocha": "^2.3.3",
"mocha-lcov-reporter": "^1.0.0",
"nodemon": "^1.7.3",
"react-addons-test-utils": "^0.14.0",
"react-addons-test-utils": "^0.14.5",
"react-transform-catch-errors": "^1.0.0",
"react-transform-hmr": "^1.0.1",
"redbox-react": "^1.1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/globals.js
Expand Up @@ -19,7 +19,7 @@ let defaultRedisDbNumber = 1;
if ( __PRODUCTION__ ) {
defaultServerHOST = 'localhost';
defaultServerPORT = 8080;
defaultWsHost = 'localhost';
defaultWsHost = 'http://hapi-reactstarterkit.rhcloud.com';
defaultWsPort = 8000;
defaultRedisHost = 'localhost';
defaultRedisPort = 6379;
Expand Down
17 changes: 13 additions & 4 deletions src/server.js
Expand Up @@ -51,18 +51,27 @@ export default function( callback ) {
labels: [ 'api' ],
routes: {
cors: {
origin: [ PROTOCOL + SERVER_HOST + ':' + WS_PORT ]
origin: [ PROTOCOL + WS_HOST + ':' + WS_PORT ]
}
}
});
server.connection({
host: SERVER_HOST,
port: WS_PORT,
labels: [ 'ws' ],
routes: {
cors: {
origin: [ PROTOCOL + WS_HOST + ':' + SERVER_PORT ]
}
}
});
server.connection({ host: SERVER_HOST, port: WS_PORT, labels: [ 'ws' ] });

// Set names for each connection
server.connections[0].name = 'API';
server.connections[1].name = 'WS';

const apiServer = server.select('api');
const wsServer = server.select('ws');
// const wsServer = server.select('ws');

server.register([
{
Expand All @@ -81,7 +90,7 @@ export default function( callback ) {
}, {
register: rooms,
options: {
server: wsServer
server: apiServer
}
}
], (err) => {
Expand Down

0 comments on commit b1e2a4b

Please sign in to comment.