Socket
Socket
Sign inDemoInstall

mysql2-nestjs

Package Overview
Dependencies
211
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mysql2-nestjs

NestJS package for mysql2


Version published
Weekly downloads
14
Maintainers
1
Install size
1.23 MB
Created
Weekly downloads
 

Readme

Source

MySql2 Combined with nestjs

For more detail look at MySql2

@Module({
  imports: [
    NestMysql2Module.register({
      host: "localhost",
      port: 30006,
      user: "root",
      password: "example"
    })
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule { }

Then in your controller:

constructor(
    @InjectMysql()
    private readonly mysql: Mysql
  ) { }
const [result, fields] = await this.mysql.query("SELECT 1+2");

Keywords

FAQs

Last updated on 20 Oct 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc