serverless-offline icon indicating copy to clipboard operation
serverless-offline copied to clipboard

Use same serverless-offline instance for many projects or monorepo app

Open throrin19 opened this issue 1 year ago • 1 comments

Feature Request

It's possible to add the possibility to use the same serverless instance tu run many projects inside the same API Gateway proxy ? (same port).

In our case we migrate a big monolitic app to a monorepo approach and we need to use the same serverless instance between the old and the new repo.

We also need this to use same apigateway between all monorepo projects (many projects can use HTTP apigateway as source)

Actually, If we would do that, we have to set different port between all projects (lambdaPort and httpPort). It's not acceptable to develop it easilly with the Front project and it complexifie that only for the local dev part.

For example, the plugin serverless-offline-aws-eventbridge use that with this configuration :

custom:
  serverless-offline-aws-eventbridge:
    port: 4010 # port to run the eventBridge mock server on
    mockEventBridgeServer: true # Set to false if EventBridge is already mocked by another stack

With that, all projects can use the same eventBridge mock part. I know, it's not the same logic as serverless-offline but if you do this, it will be awersome for many users

throrin19 avatar Feb 22 '23 15:02 throrin19