Socket
Socket
Sign inDemoInstall

go-mysql-js

Package Overview
Dependencies
2
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    go-mysql-js

MySQL connector & binlog parser


Version published
Weekly downloads
228
decreased by-33.14%
Maintainers
1
Install size
13.0 MB
Created
Weekly downloads
 

Readme

Source

go-mysql-js

A library wrapping the go-mysql package, providing a MySQL client connector and binlog parsing implementation.

Installation

npm i --save go-mysql-js

Example

import MysqlBinlog from 'go-mysql-js';

async function main() {
    let syncer = await MysqlBinlog.create({
        hostname: "localhost",
        port: 3306,
        username: "root",
        password: "mypassword",
        tableRegexes: ['Users'],
    });
    syncer.on('event', (event) => {
        console.log('got row event', event);
    });
    syncer.on('error', (err) => {
        console.error('got error', err);
    });

    process.on('SIGINT', function() {
        console.log("Caught interrupt signal");
        syncer.close();
    });
}

main().catch(err => {
    console.error(err);
    process.exit(1);
});

Keywords

FAQs

Last updated on 01 Jun 2023

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