nestjs Questions
2
Solved
In our codebase we've been using T.lean() or T.toObject() and our return types would be LeanDocument<T>. Mongoose 7 no longer exports LeanDocument, and the existing migration guide suggests u...
Zed asked 11/5, 2023 at 11:49
4
I have been trying to figure out the preferred way of doing "Event Sourcing" while using the NestJS CQRS recipe (https://docs.nestjs.com/recipes/cqrs).
I've been looking at the NestJS fra...
Bautram asked 23/12, 2018 at 18:6
3
Here's what a real simple monorepo with nestjs using turborepo looks like:
.
├── README.md
├── apps
│ └── nest
│ ├── README.md
│ ├── nest-cli.json
│ ├── package.json
│ ├── src
│ │ ├──...
2
I implemented Google and Dropbox authentication in my NestJS app within two distinct strategies.
The issue is that I never get a refresh_token along with the access_token. I already tried to remov...
Berget asked 19/5, 2019 at 16:35
5
Solved
I am playing around with NestJs using TypeORM along with MySQL.
I have went via documentation, and I have made basic CRUD app running locally.
I have built in searches (via Repository) by id, but I...
2
Solved
I need a NestJS interceptor that archives requests, both in exceptional and happy-path cases. Created as follows:
public intercept(context: ExecutionContext, next: CallHandler): Observable<any...
Soapberry asked 8/7, 2019 at 4:46
3
This is my app.module.ts in NestJS:
import { Module } from '@nestjs/common';
import { CatsModule } from './cats/cats.module';
@Module({
imports: [CatsModule, ScheduleModule.forRoot()],
})
export ...
3
I have an existing MATERIALIZED VIEW in my postgresql database. I am trying to create typeorm entity for that. Can anyone tell me how to do that. I already went through typeorm View Entities docs b...
Prolate asked 30/8, 2019 at 10:47
5
I want to create a NestJs API with TypeORM and MongoDB. My entity id fields are of type ObjectID. The controller routes should validate the incoming ids before passing them to the services. I know ...
Dentiform asked 19/2, 2020 at 14:46
2
How to store, read and delete cookies and sessions in Nest.js?
Should I use this:
@nestjs/common > session
Or should I use js-cookie?
Bryon asked 2/5, 2019 at 7:56
3
Here's my jest config inside of package.json:
"jest": {
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"moduleDirectories":["...
Privet asked 25/6, 2021 at 8:44
4
Solved
I'm trying to handle the message published on topic test_ack from online MQTT broker using microservices. But I'm getting the error.
There is no matching event handler defined in the remote servic...
4
I was looking at Nestjs documentation to set up a microservice that listens to RabbitMQ messages. It's very straight forward when I have to listen to one queue. What if there are multiple queues th...
Mcmath asked 17/7, 2020 at 8:3
9
Solved
Since nestjs is an express app, it's possible to use any library to handle upload using nest, and since it provides Midlewares, it's also possible to use multer. My question is: What's the best way...
Mychal asked 4/3, 2018 at 13:43
5
I'm working on an EmailModule that reads a pug template.
I couldn't get the build to include the *.pug templates file:
I have followed the instruction based on this:
https://github.com/nestjs/nes...
Impresario asked 25/2, 2020 at 0:11
2
I am trying to use NestJs inside Docker. For the first run 'docker compose up --build' it works good, all changes in files force application to rebuild. But if I stop docker with 'docker compose do...
4
I'm passing my authentication token via an HTTP-Only cookie in my NestJS API.
As such, when writing some E2E tests for my Auth endpoints, I'm having an issue with cookies not being where I expect ...
3
I'm using logger option in NestFactory.create() method to control Logger's log levels in production mode, but it's not working with ENV='production', still showing Logger.log() messages
const boot...
Ursula asked 21/3, 2020 at 10:54
4
Let's say I have a /createPost POST endpoint in my nestjs backend. The request and response object should be fully typed in the backend via the DTO. However, how do I bring these types into the fro...
4
Solved
I am trying to pass the connection parameters to mongodb by enviroment file and I am getting the following error
[Nest] 1176 - 12/10/2021 23:34:35 ERROR [ExceptionHandler] Cannot read property 'get...
Cambria asked 13/10, 2021 at 2:45
4
Solved
Can't authorize in a route using @nestjs/[email protected] because I dont know how to configure the Document` in a right way and I couldn't find a workable answer in authorization official doc...
Militate asked 16/8, 2021 at 20:28
3
Solved
I'm writing a registration endpoint for an api i'm working on and i'm using nestjs and class-validator to validate the input data.
The user can register using either their phone number or email add...
Feminacy asked 30/6, 2019 at 17:22
2
Solved
Class to test
My TypeORM repository extends AbstractRepository:
@EntityRepository(User)
export class UsersRepository extends AbstractRepository<User> {
async findByEmail(email: string): Pro...
Wellworn asked 29/12, 2021 at 15:9
1
I'm using NestJS 8.0.2 and I'm trying to return a PDF from an API endpoint using the new StreamableFile class which, as the documentation says:
A StreamableFile is a class that holds onto the stre...
Katharinakatharine asked 24/7, 2021 at 11:3
4
Solved
I want to add routing prefixes at the module level and/or have complex global routing prefix logic in general.
I know I can use the undocumented function NestApplication.setGlobalPrefix to set a si...
Keshiakesia asked 16/11, 2020 at 19:52
1 Next >
© 2022 - 2025 — McMap. All rights reserved.