diff --git a/.gitignore b/.gitignore index e6c6c37be..cb39c2ff8 100644 --- a/.gitignore +++ b/.gitignore @@ -41,5 +41,6 @@ dist public/uploads/* !public/uploads/.gitkeep +!public/.gitkeep uploads test_uploads diff --git a/public/.gitkeep b/public/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/src/main.ts b/src/main.ts index 7b5cf6e3f..212922f91 100644 --- a/src/main.ts +++ b/src/main.ts @@ -55,6 +55,13 @@ async function bootstrap(): Promise { 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'); }