I created a REST API using NestJs with TypeORM. Basically this is my user entity  @Entity('User') export class User extends BaseEntity {   @PrimaryGeneratedColumn()   public id: number;    @Column({ unique: true })   public username: string;...
In the REST API below, what is the type of file object that is received.   @Post('/:folderId/documents/:fileName') @UseInterceptors(FileInterceptor('file')) @ApiConsumes('multipart/form-data') @ApiImplicitParam({ name: 'fo...
While using NestJS to create API's I was wondering which is the best way to handle errors/exception. I have found two different approaches :   Have individual services and validation pipes throw new Error(), have the controller catch them and tha...
One of the controller methods in my NestJS application is supposed to take plain text as its body but whenever I try to make a request, the parameter is received as an empty object. Is this even possible or am I going to have to create some sort of D...
I'm trying since 2 days to solve this, perhaps I'm simply missing the point here.  My goal was to write a NestJS app (with TypeORM included) which serves a RestAPI for 2 or 3 of my little projects, instead of writing a NestJS-App for every si...
After first problem with JWT_MODULE_OPTION, back to old problem who I thought I was fixed. It turned out that when I "fix" old problem create the new with JWT.   So again can't compile:  Nest can't resolve dependencies of the AuthServ...
I have implemented a jwt authentication in nestJs. However whenever I attempt to authenticate using the following authorization headers:  Bearer <token> or JWT <token>   I got 401. These are my authentication files  @Injectable() export c...
I am following this tutorial to create a nest project. I have installed Nest CLI using this command:  npm i -g @nestjs/cli     I have checked the list of packages installed locally using the following command and found that it was successfully instal...
I'm trying to enable usage of socket.io acknowledgement callbacks in Nest.js WebSocketGateways.  I'd like to be able to emit this:  socket.emit('event', 'some data', function (response) { //do something });   And use the messa...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.