title: How express Hapi.js Restfy Koa app.listen() and app.get() work?
body: <p>With http node module (only native modules) how i can recreate app.listen() and app.get() use http module with a constructor</p>
  
  <pre><code>var app = function(opts) { 
       this.token= opts.token
   } 
  
   app.prototype.get = function(callback) {
       // use request and response of app.listen()
     }
  
    app.prototype.active = function(callback) {
    // use request and response of app.listen()
    // return on callback some manipulate 
    //request params
  }
  
  
  app.prototype.listen = function() {
   // start http or https server 
  }
  </code></pre>
  
  <p>Import the modules and work with this </p>
  
  <pre><code>var app = require(...)
  
  Var client = new app({
  token: 0000
  })
  
  client.get(function(error, reply) {})
  client.listen()
  </code></pre>