incito

3.0.0 • Public • Published

incito

NPM Package Build Status Coverage

Installation

npm install incito --save
const incito = require('incito');

Usage

simple http server

const server = incito();
const port = server.port;

http server with listener

function handle() {
  // magical request handling code
}
 
const server = incito(handle);

express http server

const app = express();
const server = incito(app);

koa http server

const app = new Koa();
const server = incito(app.callback());

other types of servers

const server = incito({
  type: 'https',
  listener: app
  options: {
    key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'),
    cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem'),
  },
});

Package Sidebar

Install

npm i incito

Weekly Downloads

190

Version

3.0.0

License

MIT

Unpacked Size

6.54 kB

Total Files

5

Last publish

Collaborators

  • gurpreetatwal