Closed JosephMart closed 4 years ago
This pull request is being automatically deployed with ZEIT Now (learn more). To see the status of your deployment, click below or on the icon next to each commit.
🔍 Inspect: https://zeit.co/josephmart/loki-bot/clxnivjfo ✅ Preview: https://loki-bot-git-jmm-basic-architecture.josephmart.now.sh
Would it be beneficial to add some form of registration? Each handler submits a regex for messages they care about. Some HandlerRegistry
does the regex comparisons, and delegates to Handler
s based on the comparison. Kind of like how vscode extensions register for languages they activate on.
So regarding the ts config. I think that is a pretty good idea. Now.sh kinda does the magic on how it runs I think. I am guessing we can modify stuff but not sure. Worse case me move to something else or have our TS transpile to JS which the lambda then runs. We can configure that however we want.
re registration -- I like that idea. Want to scaffold that out? :)
sure me scaffold later today. Should Handler's have config files much like vscode has language registration in the extension's package.json? I think our config maybe doesn't need to be a separate file, but maybe add an abstract method to Handler like .config(): HandlerConfig
? Maybe we throw in some dependency injection????? OP architecture ;)
re tsconfig, not sure how to work it with now, but for myma store, transpile to js and deploy/run the js is how I do it. At the very least the CI could have a yarn build, just to make sure the TS is up to snuff, and then continues with the current deployment pipeline, avoid transpile to js all together
Make the project look like a sr dev contributes to it