New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@kites/engine

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kites/engine

Core Engine of Kites

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
17
-67.92%
Maintainers
1
Weekly downloads
 
Created
Source

kites-engine

Core Engine of Kites

Join the chat at https://gitter.im/nodevn/kites npm version npm downloads Travis

Kites is a framework providing dynamic applications assembling and API routing. It contains a lot of templates and extensions help build up applications quickly.

Extensions

You are welcome to write your own extension or even publish it to the community.

TODO:

  • Write an article for implementing custom kites extension

Extensions auto discovery

Kites by default auto discovers extensions in the application's directory tree. This means kites by default searches for files kites.config.js which describes the extensions and applies all the extensions that are found.

// let kites autodiscover the extensions
var kites = require('@kites/engine')({
    logger: {
        console: {
        transport: 'console',
        level: 'debug'
    }
});

// init the kites
kites.init().then(() => {
    kites.logger.info('done!')
})

Kites extensions auto discovery slows down the startup and can be explicitly overrided using use function

// do not let kites autodiscover the extensions
// do not load extensions from locations cache
var kites = require('@kites/engine')({
    discover: false,
    extensionsLocationCache: false,
    logger: {
        console: {
        transport: 'console',
        level: 'debug'
    }
});

// explicitly use extensions
kites.use(require('@kites/express')())
    .use(require('@kites/roomrtc')())
    .init().then((kites) => {
        kites.logger.info('done!')
    })

Logging

kites leverages winston logging abstraction together with debug utility. To output logs in the console just simply set the DEBUG environment variable

DEBUG=kites node app.js

on windows:

set DEBUG=kites & node app.js

kites exposes logger property which can be used to adapt the logging as you like. You can for example just add winston console transport and filter in only important log messages into console.

var kites = require('@kites/engine')();
var winston = require('winston');
kites.logger.add(winston.transports.Console, { level: 'info' });

Keywords

kites-framework

FAQs

Package last updated on 04 Nov 2018

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