mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-13 19:45:26 +00:00
overhaul tests
This commit is contained in:
13
test/apps/credentials/src/server.js
Normal file
13
test/apps/credentials/src/server.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import polka from 'polka';
|
||||
import * as sapper from '../__sapper__/server.js';
|
||||
|
||||
const { PORT } = process.env;
|
||||
|
||||
polka()
|
||||
.use((req, res, next) => {
|
||||
// set test cookie
|
||||
res.setHeader('Set-Cookie', ['a=1; Max-Age=3600', 'b=2; Max-Age=3600']);
|
||||
next();
|
||||
})
|
||||
.use(sapper.middleware())
|
||||
.listen(PORT);
|
||||
Reference in New Issue
Block a user