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.

16 lines
341 B

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. 'use strict'
  2. const Cli = require('../')
  3. const cacheControl = require('koa-cache-control')
  4. const cliData = require('../lib/cli-data')
  5. cliData.optionDefinitions.push({ name: 'maxage', group: 'misc' })
  6. const ws = new Cli()
  7. ws.middleware
  8. .addLogging('dev')
  9. .add(cacheControl({
  10. maxAge: 15
  11. }))
  12. .addStatic()
  13. .addIndex()
  14. ws.listen()