Is the simulator meant to interact with the world? #4339
Replies: 1 comment 1 reply
-
I think it can be both. In my experience working with the Laravel framework, it is equally useful to have a Mailer implementation that logs emails locally, and a Mailer implementation that sends emails through an external service specialized in debugging emails (such as https://mailtrap.io/). That's why I'm thinking that we need to be able to specify/override the implementation for different services. In Laravel, you specify the implementation of a set of classes (Queue, Mailer, Notifier, Database, etc) via a config file. This config file can use environment variables as well. Using environment variables allows you to customize your app implementation during deployment (for example, if you deploy your app to AWS, you can use In Wing, maybe we could do something similar. |
Beta Was this translation helpful? Give feedback.
-
The simulator can effectively do anything, but how much should it conventionally be limited?
Built-in to several resources is the ability to take connections from outside, such as for the Api or Website resource. This makes sense, no big issues yet.
Then there is a reasonable expectation that if your function wants to reach out to an API outside the simulator, then there's nothing stopping you from fetching
https://dog.ceo/api/breeds/image/random
.Should the simulator stop this, or at least somehow intercept this? Should the default exception of the simulator be to mock outside resources?
The overall question is: Is the simulator simply a local runtime environment, or is it a test environment?
Beta Was this translation helpful? Give feedback.
All reactions