Skip to content

Commit

Permalink
Adding Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gja committed Jan 8, 2018
1 parent ad9aaae commit aee173f
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 21 deletions.
8 changes: 2 additions & 6 deletions app/server/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import compression from 'compression';
import express from 'express';
import createApp from '@quintype/framework/server/create-app';

import {initializeAllClients} from "@quintype/framework/server/api-client";
import {upstreamQuintypeRoutes, isomorphicRoutes, staticRoutes} from "@quintype/framework/server/routes";
Expand All @@ -9,11 +8,8 @@ import {loadData, loadErrorData} from "./load-data";
import {pickComponent} from "../isomorphic/pick-component";
import seo from "./seo";

export const app = express();
export const app = createApp();

app.set("view engine", "ejs");
app.use(express.static("public"));
app.use(compression());
upstreamQuintypeRoutes(app, {forwardAmp: true});

isomorphicRoutes(app, {
Expand Down
2 changes: 1 addition & 1 deletion app/server/load-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {PAGE_TYPE} from "../isomorphic/constants";

const WHITELIST_CONFIG_KEYS = ['cdn-image', 'polltype-host', 'layout'];

export function loadErrorData(error) {
export function loadErrorData(error, config) {
const errorComponents = { 404 : "not-found" };
return Promise.resolve({
data: null,
Expand Down
162 changes: 153 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,10 @@
"license": "MIT",
"dependencies": {
"@quintype/components": "^1.3.0",
"@quintype/framework": "^2.21.6",
"@quintype/framework": "^2.22.0",
"@quintype/seo": "^1.4.1",
"babel-plugin-transform-assets-import-to-string": "^1.0.1",
"compression": "^1.7.1",
"ejs": "^2.5.7",
"express": "^4.16.2",
"lodash": "^4.0.0",
"quintype-js": "^0.1.6",
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
Expand Down

0 comments on commit aee173f

Please sign in to comment.