Testing. You can have instances of the application with different settings to test every case.
Multiple instances. Imagine you want to run different versions of the same application. Of course you could have multiple instances with different configs set up in your webserver, but if you use factories, you can have multiple instances of the same application running in the same application process which can be handy.
Hi. Thanks for your questions :)
1-) Actually, this is a habit for me. I never used a factory method in my Flask apps. Also, I don't know what are the benefits of factory methods.
2-) I use gunicorn.
3-) I usually use dotenv. But I used class-based configs for this post :)
4-) I don't understand this question :/
Thanks :)
The fourth question means:
How do you deploy your monolith/microservices to your server?
Hmm. I'm using the EB CLI.
Firstly, I install it.
I also set secret keys for the elastic bean in the ~/.aws/config file.
and then I use these commands.
Did you mean this? :P I hope :/)
Yes, thank you. I’ve never used elastic beanstalk before, I’ll add it to the list of services to explore. Thanks for all your answers!
Actually, I only used it twice times. I'll use gcloud or azure next times. (This is my plan). Thanks :)
Benefit of using factory methods
Testing. You can have instances of the application with different settings to test every case.
Multiple instances. Imagine you want to run different versions of the same application. Of course you could have multiple instances with different configs set up in your webserver, but if you use factories, you can have multiple instances of the same application running in the same application process which can be handy.
Hmm, can you show an example about factory methods for the newbies :)
Sure in a bit
Thanks, I'll be waiting for your contribution. Thanks.
I think the question four was referring to whether it's a microservice or monolithic app.