Hi all, I am aiming to move my business logic out...
# help
f
Hi all, I am aiming to move my business logic outside of the handler function for easier unit testing. Suppose I move my business logic outside of the handler file that houses my lambda function handler. How would SST know to grab this file and the relevant imports upon deploying the application to AWS? Would it bundle the code up automatically?
r
If it's imported by the function, it'll be bundled
f
Perfect, thanks @Ross Coundon!
a
@Fazi I do this already, I’m following the “clean architecture” concept, and been using that with SLS framework. Now moving to SST and all worked fine, no changes needed. What I did is creating some Node packages like
common
,
data
,
domain
,
providers
, and all my services uses those packages. My handlers/lambdas doesn’t have any business logic, they only call those shared packages.
f
Thanks @Adrián Mouly