-
-
Notifications
You must be signed in to change notification settings - Fork 453
Description
As we in our team want to use Mockoon for local development as well as on remote in our test environment, we would like to use mockoon in a serverless environment (being it aws, azure or whatever). The main reason is, that its much easier to deploy that to setup a server that spins up a docker container created with the dockerize command.
Currently to start Mockoon programmatically one can only use the MockoonServer.start() method. The problem here is, that in a serverless environment one does not need a http server as its job would be done by the serverless environment itself. In the current implementation of the MockoonServer.start() method creating the request listener (for which express is used) and starting the node http(s) server are implemented in a single method. Adhering to this tutorial to make an express app serverless ready one would need the express instance (or the RequestListener interface more generally spoken). With the current implementation this is not possible since, as described, both steps are done in one method. Therefore i propose to split creating request listener and server into separate methods. Not only the code of MockoonServer.start() gets a little cleaner and more SOLID, it also enables wider usage of this great tool.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status