[ Web Proxy ]
URL:
Viewing: https://google.github.io/sqlcommenter/node/#install-from-source [Back]  [Original]

sqlcommenter Node.js :: sqlcommenter

Node.js

Introduction

sqlcommenter is a suite of plugins/middleware/wrappers to augment SQL statements from ORMs/Querybuilders with comments that can be used later to correlate user code with SQL statements.

Integrations

sqlcommenter-nodejs provides support for the following:

knex-logo.png [knex-logo.png]
sequelize-logo.png [sequelize-logo.png]
express_js-logo.png [express_js-logo.png]

Installing it

sqlcommenter-nodejs can installed in a couple of ways:

From source

The first step is to clone the repository. This can be done with git by running:

git clone https://github.com/google/sqlcommenter.git
Inspect the source code and note the path to the package you want installed.

sqlcommenter/nodejs/sqlcommenter-nodejs
 packages
     knex
        index.js
        package.json
        test
        ...
     sequelize
         index.js
         package.json
         test
         ...

Each folder in the packages directory can be installed by running

npm install <path/to/package>

for example to install @google-cloud/sqlcommenter-knex in a given location, run npm install /path/to/sqlcommenter-nodejs/packages/knex. Same for every package(folder) in the packages directory.

# install 
> npm install /path/to/sqlcommenter-nodejs/packages/knex

+ @google-cloud/sqlcommenter-knex@0.0.1

Verify Installation

If package is properly installed, running npm list <package-name> will output details of the package. Let’s verify the installation of @google-cloud/sqlcommenter-knex below:

# verify
> npm list @google-cloud/sqlcommenter-knex

project@0.0.0 path/to/project
 @google-cloud/sqlcommenter-knex@0.0.1  -> /path/to/sqlcommenter-nodejs/packages/knex

Inspecting the package.json file after installation should also show the installed pacakge.


Web Proxy Viewer  |  New URL  |  Original Page