mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-17 16:44:49 -04:00
Add serving of static assets under the relative URL '/public'
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
fc3d98d23a
commit
ff06f368de
3 changed files with 8 additions and 0 deletions
|
@ -55,6 +55,13 @@ async function bootstrap(): Promise<void> {
|
|||
prefix: '/uploads/',
|
||||
});
|
||||
}
|
||||
logger.log(
|
||||
`Serving the local folder 'public' under '/public'`,
|
||||
'AppBootstrap',
|
||||
);
|
||||
app.useStaticAssets('public', {
|
||||
prefix: '/public/',
|
||||
});
|
||||
await app.listen(appConfig.port);
|
||||
logger.log(`Listening on port ${appConfig.port}`, 'AppBootstrap');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue