1 | /// <reference path="init.ts"/>
|
2 |
|
3 | namespace HawtioBackend {
|
4 |
|
5 | export function mountAsset(mount:string, dir:string) {
|
6 | app.use(mount, express.static(path.normalize(dir)));
|
7 | }
|
8 |
|
9 | addStartupTask(() => {
|
10 | config.staticAssets.forEach((asset) => {
|
11 | log.info("Mounting static asset: ", asset);
|
12 | mountAsset(asset.path, asset.dir);
|
13 | });
|
14 | });
|
15 |
|
16 | }
|