add a test for server-route-as-middleware

This commit is contained in:
Richard Harris
2019-04-27 10:55:22 -04:00
parent a26f8600c1
commit 0862d0e2c8
3 changed files with 56 additions and 27 deletions

View File

@@ -0,0 +1,8 @@
export function get(req, res, next) {
if (req.headers.accept === 'application/json') {
res.end('{"json":true}');
return;
}
next();
}

View File

@@ -0,0 +1 @@
<h1>HTML</h1>