New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nark

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nark

Alerts and logs for your projects, nark will tell you when something goes wrong or an important event happens

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Nark

Send alerts (emails) when something goes terrible wrong or an important event happens in your app, it also helps to keep track of the logs of your application to generate reports with that information.

Introduction

Nark uses nodemailer to send email alerts and sequelize to store all the logs with additional information.

Installation

npm install nark

Configuration

Enter your own credentials.

var Nark = require('nark');

nark = Nark.config({
  app: 'Name of your project'
  reportTo:'jhondoe@xyz.com',
  mailSettings:{
    service: 'Gmail',
    auth: {
        user: 'alerts@gmail.com',
        pass: '123456'
    }
  },
  dbSettings:{
    database:'mydb',
    user:'myuser',
    password:'mypasswd',
    host:'localhost'
  }
});

Documentation

Save log and print it:

nark.log('Hola bartola');

You need to save additional information?

nark.log('Print a table for me please',{
  'Name':'Bartola',
  'Email':'barty@aol.com'
})

It will print something like this:

┌───────┬───────────────┐
│ Field │ Value         │
├───────┼───────────────┤
│ Name  │ Bartola       │
├───────┼───────────────┤
│ Email │ barty@aol.com │
└───────┴───────────────┘

Save a warning and print it in console

nark.warning('this is a warning that won\'t be sent');

Important message, will be saved in your database, printed in console and sent by email

nark.important('This is an important message that will be sent to the  "reportTo" value');

Errors, when shit hit the fan :/

nark.danger('Bad news :(');

Do you need to send additional information? nark can help you

nark.important('Important message with extra information',{foo:123123,bar:4234234});

The information will arrive to your emails like this

Keywords

FAQs

Package last updated on 14 Jul 2015

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