update stack examples and deps
This commit is contained in:
10
example/stack/live-reload/index.html
Normal file
10
example/stack/live-reload/index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>live-reload demo</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Live reloaded attached</h1>
|
||||
</body>
|
||||
</html>
|
14
example/stack/live-reload/stack.js
Normal file
14
example/stack/live-reload/stack.js
Normal file
@ -0,0 +1,14 @@
|
||||
'use strict'
|
||||
const LocalWebServer = require('../../../')
|
||||
const liveReload = require('koa-livereload')
|
||||
const DefaultStack = require('local-web-server-default-stack')
|
||||
|
||||
class LiveReloadStack extends DefaultStack {
|
||||
addAll () {
|
||||
return this.addLogging('dev')
|
||||
.add({ middleware: liveReload })
|
||||
.addStatic()
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = LiveReloadStack
|
Reference in New Issue
Block a user