1.0.6-a • Published 6 months ago

myhonda-sdk v1.0.6-a

Weekly downloads
-
License
UNLICENSED
Repository
-
Last release
6 months ago

NestJS Plugin Usage Guide

This guide will walk you through the usage of the Authenticator Module and CMS Module in your NestJS application.

Authenticator Module

The Authenticator Module is a powerful tool for managing user authentication in your application. It provides a set of endpoints for user registration, login, and password reset. To use the Authenticator Module, follow these steps:

  1. Import the Authenticator Module in your app.module.ts:
import { AuthenticatorModule } from 'path/to/authenticator.module';

@Module({
  imports: [AuthenticatorModule.register(configuration)],
})
export class AppModule {}
  1. Use the AuthGuard from this myhonda-sdk in your controller. The Authenticator Module provides the following endpoints:
import { AuthGuard } from 'myhonda-sdk';

@UseGuards(AuthGuard('customer'))
@Get("/secured")
async fetchNotifications(
    @Req() req,
    @Query('page') page: number,
    @Query('limit') limit: number) {
    return getResponseFormat(200, RES.OK);
}
  1. Add the followings to your .env
JWT_SECRET=secret
JWT_EXPIRES_IN=2d

CORE_MICROSERVICE_CLIENT_HOST=localhost
CORE_MICROSERVICE_CLIENT_PORT=4000

CMS Module

The CMS Module is a versatile tool for managing content in your application. It provides a set of endpoints for creating, reading, updating, and deleting content. To use the CMS Module, follow these steps:

  1. Import the CMS Module in your application:
import { CmsModule } from 'path/to/cms.module';

@Module({
  imports: [
    CmsModule.register({
      imports: [PrismaModule],
      providers: [PrismaService]
    })
  ],
})
export class NotificationModule {}
  1. Use the provided endpoints in your application. The CMS Module provides the following endpoints:
  • /cms: Create new content
  • /cms/:id: Read, update, or delete content
  • /cms?sortBy=field&sortOrder=asc&filters=[{"field":"field","operator":"eq","value":"value"}]: Paginate and filter content

That's it! You're now ready to use the Authenticator Module and CMS Module in your NestJS application. Happy coding!

0.5.63

7 months ago

0.5.61

8 months ago

0.5.62

8 months ago

0.5.60

8 months ago

1.0.6-a

6 months ago

1.0.2

7 months ago

0.5.54

8 months ago

1.0.1

7 months ago

0.5.55

8 months ago

1.0.0

7 months ago

1.0.6

6 months ago

0.5.58

8 months ago

1.0.5

7 months ago

0.5.59

8 months ago

1.0.4

7 months ago

0.5.56

8 months ago

1.0.3

7 months ago

0.5.57

8 months ago

0.5.53

9 months ago

0.5.52

9 months ago

0.5.50

9 months ago

0.5.51

9 months ago

0.5.49

9 months ago

0.5.19

11 months ago

0.5.43

10 months ago

0.5.44

9 months ago

0.5.41

10 months ago

0.5.42

10 months ago

0.5.40

10 months ago

0.5.47

9 months ago

0.5.48

9 months ago

0.5.45

9 months ago

0.5.46

9 months ago

0.5.32

10 months ago

0.5.33

10 months ago

0.5.30

10 months ago

0.5.31

10 months ago

0.5.38

10 months ago

0.5.39

10 months ago

0.5.36

10 months ago

0.5.37

10 months ago

0.5.34

10 months ago

0.5.35

10 months ago

0.5.32-beta

10 months ago

0.5.21

11 months ago

0.5.22

11 months ago

0.5.20

11 months ago

0.5.29

10 months ago

0.5.32-beta-1

10 months ago

0.5.27

10 months ago

0.5.28

10 months ago

0.5.25

11 months ago

0.5.26

11 months ago

0.5.32-beta-2

10 months ago

0.5.23

11 months ago

0.5.24

11 months ago

0.5.18

11 months ago

0.5.17

11 months ago

0.5.16

11 months ago

0.5.15

11 months ago

0.5.14

11 months ago

0.5.13

11 months ago

0.5.12

11 months ago

0.5.11

11 months ago

0.5.10

12 months ago

0.5.9

12 months ago

0.5.8

12 months ago

0.5.7

12 months ago

0.5.6

12 months ago

0.5.5

12 months ago

0.5.4

12 months ago

0.5.3

12 months ago

0.5.2

12 months ago

0.5.1

12 months ago

0.5.0

12 months ago

0.4.17

12 months ago

0.4.16

1 year ago

0.4.15

1 year ago

0.4.14

1 year ago

0.4.13

1 year ago

0.4.12

1 year ago

0.4.11

1 year ago

0.4.10

1 year ago

0.4.9

1 year ago

0.4.8

1 year ago

0.4.7

1 year ago

0.4.6

1 year ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.3

1 year ago

0.4.2

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.13

1 year ago

0.3.11

1 year ago

0.3.10

1 year ago

0.3.9

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.4

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.0

1 year ago

0.0.1

1 year ago