- Create an
.npmrc
to download the package
@dulliag:registry=https://npm.pkg.github.com/
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
- Install the package
npm install @dulliag/logger.js
Now you can use logger.js...
import { Credentials } from '@dulliag/logger.js';
const credentials: Credentials = {
host: 'HOST',
user: 'USER',
password: 'PASSWORD',
database: 'DATABASE',
};
import { Credentials, ClientOptions, Client } from '@dulliag/logger.js';
const credentials: Credentials = {
host: 'HOST',
user: 'USER',
password: 'PASSWORD',
database: 'DATABASE',
};
const options = {
application: "APPLICATION
} as ClientOptions;
const client = new Client("PostgreSQL" /* type of Database */, credentials, options);
client.log("LOG", "TAG", "MESSAGE");