Commit graph

1910 commits

Author SHA1 Message Date
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
9b3345fa13
Use serve-static to serve uploaded files.
Add `@nestjs/serve-static` to serve uploaded media from the upload directory on the local filesystem.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-10-16 22:38:31 +02:00
David Mehren
93cf9c2c56
NotesController: Use custom logic to access raw markdown
NestJS does not support content-types other than application/json.
Therefore we need to directly access the request object to get the raw body content.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-09-19 14:51:12 +02:00
David Mehren
6bee3b16cf
Add Session entity
This entity implements the Session interface from connect-typeorm, which we will later use to store session data from express-session.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-13 20:25:43 +02:00
David Mehren
7ceebb47ba
Update yarn.lock with Nest 7.4
Signed-off-by: David Mehren <git@herrmehren.de>
2020-08-12 19:54:05 +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
69afdd3b05
Add NoteModule
This contains the module, a model which was adapted from the old code and two DTOs.

Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-25 20:24:59 +02:00
David Mehren
774f9cd8a3
Add TypeORM support
Signed-off-by: David Mehren <git@herrmehren.de>
2020-07-24 21:50:30 +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
David Mehren
d6d4f35cf5
Import meta-files
These files are imported from HedgeDoc 1 / the master branch.

Signed-off-by: David Mehren <git@herrmehren.de>
2022-01-23 22:02:58 +01:00