Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

myhonda-sdk

Package Overview
Dependencies
Maintainers
0
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

myhonda-sdk

A NestJS SDK for building Honda-related applications, providing modules for authentication and content management.

  • 0.5.62
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

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!

FAQs

Package last updated on 03 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc