Skip to content

Commit

Permalink
💡 Added pretty printed JSON responses
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed May 12, 2016
1 parent 148c36b commit b8f70c4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -29,6 +29,7 @@
"koa-etag": "^2.1.1",
"koa-generic-session": "^1.10.2",
"koa-helmet": "^2.0.0-alpha.1",
"koa-json": "^2.0.2",
"koa-livereload": "^0.1.23",
"koa-logger": "^2.0.0",
"koa-manifest-rev": "0.0.3",
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Expand Up @@ -44,6 +44,7 @@ import rateLimit from 'koa-ratelimit';
// view rendering
import views from 'koa-nunjucks-promise';
import bodyParser from 'koa-bodyparser';
import json from 'koa-json';

// security
import helmet from 'koa-helmet';
Expand Down Expand Up @@ -219,6 +220,9 @@ app.use(async function(ctx, next) {
await next();
});

// pretty-printed json responses
app.use(json());

// auth
app.use(passport.initialize());
app.use(passport.session());
Expand Down

0 comments on commit b8f70c4

Please sign in to comment.