Skip to content

Commit

Permalink
v0.7.0
Browse files Browse the repository at this point in the history
- added import/exports loader until pr merged
- updated to *[email protected]* #celebrate! https://horizon.io
- updated *horizon-react* to v0.3.0
- updated *react-hot-loader* to 3.0.0-beta2
- creating the horizon client manually in lovli.js instead of letting it be generated by horizon-react
- renamed db from 'horizon' to 'lovli'
- fixed webpack issue with later.js and removed LATER_COV= env
- fixed react-hot-loader HMR issue
  • Loading branch information
flipace committed May 17, 2016
1 parent bd497ef commit 67aa8cd
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 13 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Change Log

### v0.7.0
- added import/exports loader until pr merged
- updated to *[email protected]* #celebrate! https://horizon.io
- updated *horizon-react* to v0.3.0
- updated *react-hot-loader* to 3.0.0-beta2
- creating the horizon client manually in lovli.js instead of letting it be generated by horizon-react
- renamed db from 'horizon' to 'lovli'
- fixed webpack issue with later.js and removed LATER_COV= env
- fixed react-hot-loader HMR issue

### v0.6.0
- updated to ```[email protected]```

Expand Down
2 changes: 1 addition & 1 deletion config/db.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
db: 'horizon',
db: 'lovli',
servers: [
{
host: '127.0.0.1',
Expand Down
1 change: 1 addition & 0 deletions config/webpack/webpack.config.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ module.exports = {
{
winston: 'commonjs winston',
express: 'commonjs express',
later: 'commonjs later',
'@horizon/server': 'commonjs @horizon/server'
}
]
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"progress-bar-webpack-plugin": "^1.6.0",
"raw-loader": "^0.5.1",
"react-addons-perf": "15.0.1",
"react-hot-loader": "^3.0.0-alpha.13",
"react-hot-loader": "^3.0.0-beta.2",
"react-transform-catch-errors": "1.0.2",
"redbox-react": "1.2.3",
"redux-devtools": "3.2.0",
Expand All @@ -51,13 +51,15 @@
"webpack-dev-server": "1.14.1"
},
"dependencies": {
"@horizon/client": "0.1.0",
"@horizon/server": "0.1.1-0",
"@horizon/client": "1.0.1",
"@horizon/server": "1.0.1",
"exports-loader": "^0.6.3",
"express": "^4.13.4",
"file-loader": "^0.8.5",
"hoist-non-react-statics": "^1.0.5",
"horizon-react": "0.2.1",
"immutable": "3.8.1",
"imports-loader": "^0.6.5",
"later": "^1.2.0",
"lodash": "4.11.1",
"normalize.css": "^4.1.1",
Expand All @@ -73,8 +75,8 @@
"winston": "^2.2.0"
},
"scripts": {
"start": "LATER_COV= babel-node bin/dev.js",
"prod": "LATER_COV= npm run build && node ./.build/server.bundle.js",
"start": "babel-node bin/dev.js",
"prod": "npm run build && node ./.build/server.bundle.js",
"build": "webpack --config=config/webpack/webpack.config.client.prod.js && webpack --config=config/webpack/webpack.config.server.js"
}
}
3 changes: 2 additions & 1 deletion source/client/containers/Root.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import { Connector as HorizonConnector } from 'horizon-react';

import routes from '../routes';
import store from '../store';
import horizon from '../db';

export default () => (
<HorizonConnector store={store}>
<HorizonConnector horizon={horizon} store={store}>
{routes}
</HorizonConnector>
);
9 changes: 9 additions & 0 deletions source/client/db.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Horizon from '@horizon/client';

const horizon = Horizon({
secure: false
});

horizon.connect();

export default horizon;
8 changes: 3 additions & 5 deletions source/client/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,9 @@ if (module.hot) {
module.hot.accept();
}

// hack until this works without problems in horizon
localStorage.removeItem('horizon-jwt');

// Render application to target container
ReactDOM.render(
<AppContainer ><Root /></AppContainer>,
<AppContainer><Root /></AppContainer>,
rootElement
);

Expand All @@ -26,8 +23,9 @@ ReactDOM.render(
// https://github.com/gaearon/react-hot-loader/issues/249
if (module.hot) {
module.hot.accept('./containers/Root', () => {
const root = require('./containers/Root').default;
ReactDOM.render(
<AppContainer component={require('./containers/Root').default} />,
<AppContainer><root /></AppContainer>,
rootElement
);
});
Expand Down
4 changes: 3 additions & 1 deletion source/server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ const run = () => {

// @TODO make this configurable
const horizonServer = horizon(httpServer, {
auto_create_table: true,
auto_create_collection: true,
auto_create_index: true,
project_name: 'lovli',
permissions: false, // waiting for additions to permission system atm
auth: {
allow_anonymous: true,
allow_unauthenticated: true,
Expand Down

0 comments on commit 67aa8cd

Please sign in to comment.