mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
22 lines
484 B
TypeScript
22 lines
484 B
TypeScript
import Koa = require('koa');
|
|
import send = require('koa-send');
|
|
|
|
const app = new Koa();
|
|
|
|
app.use(async (ctx: Koa.Context) => {
|
|
const path: string = await send(ctx, 'stimpy.html');
|
|
});
|
|
|
|
app.use(async (ctx: Koa.Context) => {
|
|
await send(ctx, 'stimpy.html', {
|
|
root: '../static-files',
|
|
index: 'index.html',
|
|
maxAge: 10,
|
|
hidden: true,
|
|
format: true,
|
|
gzip: true,
|
|
setHeaders: () => { },
|
|
extensions: ['shemp'],
|
|
});
|
|
});
|