feat: Serve static assets of apps
This commit is contained in:
15
packages/backend/src/helpers/app-assets-handler.ts
Normal file
15
packages/backend/src/helpers/app-assets-handler.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import express, { Application } from 'express';
|
||||
import App from '../models/app';
|
||||
|
||||
const appAssetsHandler = async (app: Application) => {
|
||||
const appNames = App.list;
|
||||
|
||||
appNames.forEach(appName => {
|
||||
app.use(
|
||||
`/apps/${appName}/assets/favicon.svg`,
|
||||
express.static(`src/apps/${appName}/assets/favicon.svg`)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
export default appAssetsHandler;
|
Reference in New Issue
Block a user