Skip to content

Commit 5928e11

Browse files
committed
fixes #16
1 parent 4ebe5c7 commit 5928e11

File tree

6 files changed

+31
-14
lines changed

6 files changed

+31
-14
lines changed

.flowconfig

Lines changed: 0 additions & 10 deletions
This file was deleted.

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
FROM node:8.7-alpine as devBuild
33
WORKDIR /usr/src/app
44

5+
RUN yarn
56
# Copy the source and build
67
# Build script uses --dev flag to get the right dependencies
78
COPY . .
8-
RUN yarn run build
9+
RUN yarn run build:prod
910

1011
# PROD BUILD STEP
1112
# Using latest LTS release of Node (comes with Yarn package manager by default)

package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"dependencies": {
3232
"apollo-cache-inmemory": "^1.1.10",
3333
"apollo-client": "^2.2.6",
34+
"apollo-fetch": "^0.7.0",
3435
"apollo-link-http": "^1.5.3",
3536
"apollo-server-express": "^1.3.2",
3637
"babel-runtime": "^6.26.0",
@@ -85,5 +86,16 @@
8586
"snapshotSerializers": [
8687
"enzyme-to-json/serializer"
8788
]
89+
},
90+
"nodemonConfig": {
91+
"ignore": [
92+
"src/.next*",
93+
"src/pages*"
94+
],
95+
"delay": "10",
96+
"verbose": false,
97+
"watch": [
98+
"src"
99+
]
88100
}
89101
}

src/data/validation/ValidationError.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export default class ValidationError extends Error {
22
constructor(err) {
33
super(err.message);
44
this.code = err.code;
5+
56
Error.captureStackTrace(this, ValidationError);
67
}
78
}

src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ const delay = dev ? /* 1000 * 60 * 1 1 minute */ 0 : 0;
3636
seedCache(delay);
3737

3838
const app = nextApp({ dir: appPath, dev });
39-
4039
const handle = app.getRequestHandler();
40+
4141
app.prepare()
4242
.then(() => {
4343
const server = express();

yarn.lock

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ apollo-client@^2.2.6:
263263
optionalDependencies:
264264
"@types/async" "2.0.47"
265265

266+
apollo-fetch@^0.7.0:
267+
version "0.7.0"
268+
resolved "https://registry.yarnpkg.com/apollo-fetch/-/apollo-fetch-0.7.0.tgz#63c255a0ccb1b4c473524d8f9b536d72438bd3e7"
269+
dependencies:
270+
cross-fetch "^1.0.0"
271+
266272
apollo-link-dedup@^1.0.0:
267273
version "1.0.8"
268274
resolved "https://registry.yarnpkg.com/apollo-link-dedup/-/apollo-link-dedup-1.0.8.tgz#8c3028cf32557bd040ab6ba8856f38067bdacead"
@@ -1857,6 +1863,13 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
18571863
safe-buffer "^5.0.1"
18581864
sha.js "^2.4.8"
18591865

1866+
cross-fetch@^1.0.0:
1867+
version "1.1.1"
1868+
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-1.1.1.tgz#dede6865ae30f37eae62ac90ebb7bdac002b05a0"
1869+
dependencies:
1870+
node-fetch "1.7.3"
1871+
whatwg-fetch "2.0.3"
1872+
18601873
[email protected], cross-spawn@^5.0.1, cross-spawn@^5.1.0:
18611874
version "5.1.0"
18621875
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449"
@@ -4685,7 +4698,7 @@ next@^5.0.0:
46854698
write-file-webpack-plugin "4.2.0"
46864699
xss-filters "1.2.7"
46874700

4688-
node-fetch@^1.0.1:
4701+
node-fetch@1.7.3, node-fetch@^1.0.1:
46894702
version "1.7.3"
46904703
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
46914704
dependencies:
@@ -6687,7 +6700,7 @@ whatwg-encoding@^1.0.3:
66876700
dependencies:
66886701
iconv-lite "0.4.19"
66896702

6690-
whatwg-fetch@>=0.10.0:
6703+
whatwg-fetch@2.0.3, whatwg-fetch@>=0.10.0:
66916704
version "2.0.3"
66926705
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"
66936706

0 commit comments

Comments
 (0)