Files
DefinitelyTyped/serve-static/serve-static-tests.ts
David Gardiner 40191cf78c Remove circular dependency
express.d.ts and serve-static.d.ts had a circular dependency, which causes NuGet pain.
Extract core definitions from express.d.ts and move them to express-serve-static-core.d.ts
Update serve-static.d.ts to depend on express-serve-static-core.d.ts
2016-02-19 10:05:49 +10:30

27 lines
729 B
TypeScript

/// <reference path="serve-static.d.ts" />
/// <reference path="../express/express.d.ts" />
import * as express from 'express';
import * as serveStatic from 'serve-static';
var app = express();
app.use(serveStatic('/1'));
app.use(serveStatic('/2', { }));
app.use(serveStatic('/3', {
dotfiles: 'ignore',
etag: true,
extensions: ['html'],
index: true,
lastModified: true,
maxAge: 0,
redirect: true,
setHeaders: function(res: express.Response, path: string, stat: any) {
res.setHeader('Server', 'server-static middleware');
}
}));
serveStatic.mime.define({
'application/babylon': ['babylon'],
'application/babylonmeshdata': ['babylonmeshdata'],
'application/fx': ['fx']
});