mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-16 12:54:38 +00:00
overhaul tests
This commit is contained in:
19
test/apps/ignore/src/server.js
Normal file
19
test/apps/ignore/src/server.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import polka from 'polka';
|
||||
import * as sapper from '../__sapper__/server.js';
|
||||
|
||||
const { PORT } = process.env;
|
||||
|
||||
const app = polka().use(sapper.middleware({
|
||||
ignore: [
|
||||
/foobar/i,
|
||||
'/buzz',
|
||||
'fizz',
|
||||
x => x === '/hello'
|
||||
]
|
||||
}));
|
||||
|
||||
['foobar', 'buzz', 'fizzer', 'hello'].forEach(uri => {
|
||||
app.get('/'+uri, (req, res) => res.end(uri));
|
||||
});
|
||||
|
||||
app.listen(PORT);
|
||||
Reference in New Issue
Block a user