David Mehren
28a1628722
Switch to new buffered logger
...
NestJS 8 allows the logs to buffer on startup, so that all logs run
through our custom logger.
See also https://docs.nestjs.com/techniques/logger#dependency-injection
Signed-off-by: David Mehren <git@herrmehren.de>
2021-07-15 20:21:42 +02:00
David Mehren
4959be739a
Handle config initialisation error on app bootstrap
...
Signed-off-by: David Mehren <git@herrmehren.de>
2021-04-29 16:22:01 +02:00
Philip Molares
162f736647
PrivateApi: Add CORS-Header for rendererOrigin
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-02 17:36:51 +02:00
Tilman Vatteroth
ff06f368de
Add serving of static assets under the relative URL '/public'
...
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
2021-04-25 14:41:38 +02:00
Philip Molares
697ca823d5
Logging: Remove NestConsoleLoggerService
...
This is not necessary anymore, because we can inject ConsoleLoggerService directly.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-02 19:08:30 +02:00
Philip Molares
8dd3a3d7dd
Logging: Add OpenAPI log messages
...
Let the user know where the OpenAPI docs can be found.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-02 17:40:44 +02:00
Philip Molares
ebc8d459fb
Logging: Improve mediabackend filesystem log message.
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-04-02 17:38:22 +02:00
David Mehren
b128efebff
Enforce explicit function return types
...
This re-enables the `@typescript-eslint/explicit-module-boundary-types`
check and also enables the
`@typescript-eslint/explicit-function-return-type` check.
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-27 17:41:32 +01:00
David Mehren
71e2f06bbb
Fix ESLint errors in main.ts
...
Signed-off-by: David Mehren <git@herrmehren.de>
2021-02-24 21:08:08 +01:00
Philip Molares
ea4ccc76e4
StaticServe: Fix serving images under uploads/
...
This did not work until now, because path and prefix were swapped.
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-02-15 07:39:52 +01:00
David Mehren
1883db4c93
Swagger: Split public and private API
...
Fixes #759
Signed-off-by: David Mehren <git@herrmehren.de>
2021-01-25 23:11:56 +01:00
Philip Molares
33d9c455b8
openapi: adds auth to all public api routes
...
See:
https://docs.nestjs.com/openapi/security
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-16 17:45:14 +01:00
Philip Molares
072ef223e0
config: splits config in multiple files
...
splits the big appConfig in multiple configs
adds media.config.mock.ts
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-15 16:57:04 +01:00
David Mehren
cd37eef45e
Get port and upload path from config
...
Signed-off-by: David Mehren <git@herrmehren.de>
Co-authored-by: Yannick Bungers <git@innay.de>
2020-10-30 22:35:57 +01:00
Tilman Vatteroth
7aeaf488c4
Change year in copyright to 2021
...
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
2021-01-06 21:36:07 +01:00
Philip Molares
dc63c76f43
added reuse information
...
Signed-off-by: Philip Molares <philip.molares@udo.edu>
2021-01-05 22:12:38 +01:00
David Mehren
15db6a9b2a
Use useStaticAssets
instead of @nestjs/serve-static
...
`serve-static` does not work with `createTestingModule` and is not recommended when "just" serving a few images.
See https://github.com/nestjs/serve-static/issues/240
Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-24 11:32:23 +02:00
David Mehren
e37722a56a
Switch to using the new custom logger
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-27 21:48:42 +02:00
David Mehren
1906f44e74
Enable automatic OpenAPI spec generation.
...
NestJS can automatically generate an OpenAPI spec by analyzing controllers and used DTOs.
This commit enables this feature. The API docs are served under /apidoc.
Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-26 16:53:43 +02:00
David Mehren
74208468c4
Fix formatting in main.ts
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-25 20:26:10 +02:00
David Mehren
e53a8648b4
Add empty NestJS application
...
Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-21 21:24:56 +02:00