BackendStack21 / fast-gateway

Fast-gateway is an easy to use Node.js API gateway framework built to handle large scale API traffic with great performance and scalability. Written with JavaScript, it is a framework for the masses!
MIT License
311 stars 34 forks source link

Missing dependency #34

Closed Pitros closed 4 years ago

Pitros commented 4 years ago

I've tried to run just an example and it crashes since it requires http-lambda-proxy by default. Even if i'm not using it.

Used code:

const gateway = require('fast-gateway')

const server = gateway({
  routes: [{
    prefix: '/auth',
    target: 'http://127.0.0.1:3000'
  }]
})

server.start(8080)
Error: Cannot find module 'http-lambda-proxy'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
    at Function.Module._load (internal/modules/cjs/loader.js:506:25)
    at Module.require (internal/modules/cjs/loader.js:636:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (C:\Users\xpitr\Dev\postboxes\gateway\node_modules\fast-gateway\lib\proxy-factory.js:3:21)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
jkyberneees commented 4 years ago

Hi @Pitros that is not supposed to happen. I will check ASAP.

Thanks for reporting.

jkyberneees commented 4 years ago

Hi @Pitros, http-lambda-proxy is now an optional dependency as it should be. You can update to v2.3.1

Thanks.