2024-02-20 16:30:46 +00:00
|
|
|
import * as plugins from '../plugins.js';
|
2023-03-30 13:15:48 +00:00
|
|
|
|
|
|
|
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();
|
|
|
|
});
|
|
|
|
};
|