vtol

1.0.5 • Public • Published

VTOL CI status

VTOL is a Node.js middleware designed to handle and manage the generating logs and the special events associated with your application

Installation

npm install vtol

Usage

const vtol = require("vtol")

//for general purpose

app.use(vtol.vtolEngine({
  "serverName" : "TC Labs",
  "enableSlack" : true,
  "resTime" : "1",
  "slackWebHook" : " your slack webhook",
}))

resTime is the threshold value which you can set, if any request takes
more time than resTime then you will be notified and that particular
event will be logged ( default value = 2 ms )
  
enableSlack will send notifications to slack

//for registering special events - just add this middleware
//to that particular route

//example - >

router.post('/login',vtol.vtolSpecialEvents({
    "enableSlack" : true, //true or false
    "slackWebHook" : "your slack webhhok",
    specialEventObj : {
        "eventName" : "order placed"
    }
}),function(req,res,next){
    res.send("Order Confirmed")
}

 

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Source Code

License

MIT

Authors and Contributors

Pravandan Chand - LinkedIn Profile

Readme

Keywords

none

Package Sidebar

Install

npm i vtol

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

6.22 kB

Total Files

5

Last publish

Collaborators

  • pravandan