Skip to content

Commit 67aa8cd

Browse files
committed
v0.7.0
- added import/exports loader until pr merged - updated to *horizon@1.0.1* #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
1 parent bd497ef commit 67aa8cd

File tree

8 files changed

+36
-13
lines changed

8 files changed

+36
-13
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Change Log
22

3+
### v0.7.0
4+
- added import/exports loader until pr merged
5+
- updated to *horizon@1.0.1* #celebrate! https://horizon.io
6+
- updated *horizon-react* to v0.3.0
7+
- updated *react-hot-loader* to 3.0.0-beta2
8+
- creating the horizon client manually in lovli.js instead of letting it be generated by horizon-react
9+
- renamed db from 'horizon' to 'lovli'
10+
- fixed webpack issue with later.js and removed LATER_COV= env
11+
- fixed react-hot-loader HMR issue
12+
313
### v0.6.0
414
- updated to ```horizon-react@0.2.1```
515

config/db.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
db: 'horizon',
2+
db: 'lovli',
33
servers: [
44
{
55
host: '127.0.0.1',

config/webpack/webpack.config.server.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module.exports = {
5959
{
6060
winston: 'commonjs winston',
6161
express: 'commonjs express',
62+
later: 'commonjs later',
6263
'@horizon/server': 'commonjs @horizon/server'
6364
}
6465
]

package.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"progress-bar-webpack-plugin": "^1.6.0",
4040
"raw-loader": "^0.5.1",
4141
"react-addons-perf": "15.0.1",
42-
"react-hot-loader": "^3.0.0-alpha.13",
42+
"react-hot-loader": "^3.0.0-beta.2",
4343
"react-transform-catch-errors": "1.0.2",
4444
"redbox-react": "1.2.3",
4545
"redux-devtools": "3.2.0",
@@ -51,13 +51,15 @@
5151
"webpack-dev-server": "1.14.1"
5252
},
5353
"dependencies": {
54-
"@horizon/client": "0.1.0",
55-
"@horizon/server": "0.1.1-0",
54+
"@horizon/client": "1.0.1",
55+
"@horizon/server": "1.0.1",
56+
"exports-loader": "^0.6.3",
5657
"express": "^4.13.4",
5758
"file-loader": "^0.8.5",
5859
"hoist-non-react-statics": "^1.0.5",
5960
"horizon-react": "0.2.1",
6061
"immutable": "3.8.1",
62+
"imports-loader": "^0.6.5",
6163
"later": "^1.2.0",
6264
"lodash": "4.11.1",
6365
"normalize.css": "^4.1.1",
@@ -73,8 +75,8 @@
7375
"winston": "^2.2.0"
7476
},
7577
"scripts": {
76-
"start": "LATER_COV= babel-node bin/dev.js",
77-
"prod": "LATER_COV= npm run build && node ./.build/server.bundle.js",
78+
"start": "babel-node bin/dev.js",
79+
"prod": "npm run build && node ./.build/server.bundle.js",
7880
"build": "webpack --config=config/webpack/webpack.config.client.prod.js && webpack --config=config/webpack/webpack.config.server.js"
7981
}
8082
}

source/client/containers/Root.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ import { Connector as HorizonConnector } from 'horizon-react';
44

55
import routes from '../routes';
66
import store from '../store';
7+
import horizon from '../db';
78

89
export default () => (
9-
<HorizonConnector store={store}>
10+
<HorizonConnector horizon={horizon} store={store}>
1011
{routes}
1112
</HorizonConnector>
1213
);

source/client/db.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import Horizon from '@horizon/client';
2+
3+
const horizon = Horizon({
4+
secure: false
5+
});
6+
7+
horizon.connect();
8+
9+
export default horizon;

source/client/entry.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,9 @@ if (module.hot) {
1212
module.hot.accept();
1313
}
1414

15-
// hack until this works without problems in horizon
16-
localStorage.removeItem('horizon-jwt');
17-
1815
// Render application to target container
1916
ReactDOM.render(
20-
<AppContainer ><Root /></AppContainer>,
17+
<AppContainer><Root /></AppContainer>,
2118
rootElement
2219
);
2320

@@ -26,8 +23,9 @@ ReactDOM.render(
2623
// https://github.com/gaearon/react-hot-loader/issues/249
2724
if (module.hot) {
2825
module.hot.accept('./containers/Root', () => {
26+
const root = require('./containers/Root').default;
2927
ReactDOM.render(
30-
<AppContainer component={require('./containers/Root').default} />,
28+
<AppContainer><root /></AppContainer>,
3129
rootElement
3230
);
3331
});

source/server/app.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ const run = () => {
4545

4646
// @TODO make this configurable
4747
const horizonServer = horizon(httpServer, {
48-
auto_create_table: true,
48+
auto_create_collection: true,
4949
auto_create_index: true,
50+
project_name: 'lovli',
51+
permissions: false, // waiting for additions to permission system atm
5052
auth: {
5153
allow_anonymous: true,
5254
allow_unauthenticated: true,

0 commit comments

Comments
 (0)