Skip to content

Commit

Permalink
fix(example): update middleware usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
sonicoder86 committed Sep 11, 2017
1 parent 9a72543 commit ba5b0c5
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.spec.js
node_modules
.idea
tmp
3 changes: 2 additions & 1 deletion koaexample.js → koa-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ app.use(async (ctx, next) => {
await next();
});
app.use(logFactory.getMiddleware());
app.use(async () => {
app.use(async (ctx) => {
logger.info('works');
ctx.body = 'It works';
});

app.listen(port);
Expand Down
36 changes: 18 additions & 18 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"test": "mocha ./src/ --recursive",
"test:watch": "mocha ./src/ --recursive --watch",
"semantic-release": "CI=true semantic-release pre && npm publish --access public && semantic-release post"
"semantic-release": "CI=true semantic-release pre && npm publish --access public && semantic-release post",
"koa-example": "DEBUG=* node koa-example.js"
},
"bin": {
"json-logger": "./bin/json-logger.js"
Expand Down
Empty file removed tmp/.gitkeep
Empty file.

0 comments on commit ba5b0c5

Please sign in to comment.