typedserver/ts/servertools/tools.manifest.ts
2024-02-20 17:30:46 +01:00

15 lines
477 B
TypeScript

import * as plugins from '../plugins.js';
export const setupManifest = async (
expressInstanceArg: plugins.express.Application,
manifestArg: plugins.smartmanifest.ISmartManifestConstructorOptions
) => {
const smartmanifestInstance = new plugins.smartmanifest.SmartManifest(manifestArg);
expressInstanceArg.get('/manifest.json', async (req, res) => {
res.status(200);
res.type('json');
res.write(smartmanifestInstance.jsonString());
res.end();
});
};