docs.. examples

This commit is contained in:
Lloyd Brookes
2015-11-15 23:52:13 +00:00
parent b945f29feb
commit a5a1b6f9ec
10 changed files with 83 additions and 13 deletions

View File

@ -1,3 +0,0 @@
{
"spa": "spa.html"
}

View File

@ -1,3 +0,0 @@
body {
background-color: IndianRed;
}

View File

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

View File

@ -1,8 +0,0 @@
<head>
<link rel="stylesheet" href="css/style.css">
</head>
<h1>Single Page App</h1>
<h2>Location: <span></span></h2>
<script>
document.querySelector('h2 span').textContent = window.location.pathname
</script>

View File

@ -101,12 +101,12 @@ test('mime', function(t){
}})
})
test('blacklist', function (t) {
test('forbid', function (t) {
t.plan(2)
const app = localWebServer({
log: { format: 'none' },
static: { root: __dirname + '/fixture' },
blacklist: [ /php$/, /html$/ ]
forbid: [ /php$/, /html$/ ]
})
const server = launchServer(app, { leaveOpen: true })
request('http://localhost:8100/something.php')