Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/josudoey/koa4listen

provide a function for create http or https server to listen.
https://github.com/josudoey/koa4listen

Last synced: about 1 month ago
JSON representation

provide a function for create http or https server to listen.

Awesome Lists containing this project

README

        

# koa4listen

## Installation

```bash
$ npm install --save koa4listen
```

## Example

```js
var createServer = require('koa4listen');
var opts = require('cert4https');
var app = require('koa')();
var server = createServer(app, opts);
server.on('listening', function () {
var web_listen = server.address().address + ':' + server.address().port;
console.log('service listein on ' + web_listen);
});
server.listen(3000);
```