You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
345 B

  1. 'use strict'
  2. const Koa = require('koa')
  3. const localWebServer = require('../')
  4. const cacheControl = require('koa-cache-control')
  5. const convert = require('koa-convert')
  6. const app = new Koa()
  7. const ws = localWebServer({
  8. 'no-cache': true,
  9. log: { format: 'dev' }
  10. })
  11. app.use(convert(cacheControl({
  12. maxAge: 15
  13. })))
  14. app.use(ws)
  15. app.listen(8000)