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.
24 lines
433 B
24 lines
433 B
'use strict'
|
|
const Cli = require('../cli')
|
|
const cacheControl = require('koa-cache-control')
|
|
const cliData = require('../lib/cli-data')
|
|
|
|
cliData.push({ name: 'black' })
|
|
|
|
const ws = new Cli({
|
|
'no-cache': true,
|
|
log: { format: 'dev' }
|
|
})
|
|
|
|
ws.middleware.splice(
|
|
ws.middleware.findIndex(m => m.name === 'mime-type'),
|
|
1,
|
|
{
|
|
name: 'cache-control',
|
|
create: convert(cacheControl({
|
|
maxAge: 15
|
|
}))
|
|
}
|
|
)
|
|
|
|
ws.listen()
|