summaryrefslogtreecommitdiff
path: root/src/middleware/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-03-16 15:50:10 +0100
committerJules Laplace <jules@okfoc.us>2017-03-16 15:50:10 +0100
commit8e05164678d302700c794feecd50d83357f7719d (patch)
treeed5b167c75a2c4fdb5dcd8c409094b607698a0d5 /src/middleware/index.js
parentb8bfbbe14bdb72e4feccb4652c48f4cdb2a5e199 (diff)
feathers stuff
Diffstat (limited to 'src/middleware/index.js')
-rw-r--r--src/middleware/index.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/middleware/index.js b/src/middleware/index.js
new file mode 100644
index 0000000..6d655fa
--- /dev/null
+++ b/src/middleware/index.js
@@ -0,0 +1,16 @@
+'use strict';
+
+const handler = require('feathers-errors/handler');
+const notFound = require('./not-found-handler');
+const logger = require('./logger');
+
+module.exports = function() {
+ // Add your custom middleware here. Remember, that
+ // just like Express the order matters, so error
+ // handling middleware should go last.
+ const app = this;
+
+ app.use(notFound());
+ app.use(logger(app));
+ app.use(handler());
+};