-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loopback 4 example - convert lamdba-wrapper.js to Typescript equivalent. #40
Comments
Hi @awongCM, happy to hear you found the tutorial useful! To the best of my recollection, the reason for JS rather than TS was that LB4 was added as a fix and I did not spend the time to look into the TS code as I was unfamiliar with TypeScript :-) If you feel comfortable, please go ahead and create a PR for this change. Or if you prefer, I can do the PR with the code provided. |
Hi @marcelobern Ah. That makes sense! Thank you for the candid reply. I certainly enjoy the tutorial - without a doubt! I have been working on my own pet serverless projects on my profile, and I've been recommended by my colleague how great the loopback framework is for building enterprise-level microservices due to its strong DDD philosophy. Thus it had me pondering how to incorporate loopback's microservices architecture into the serverless world until I googled "loopback serverless" which lead me to your GitHub repo as the first search result page.. ;) I'm more than happy to contribute. 👍 Let me create one and get back to on the PR submitted. |
I create my local PR; did the above code to replace .js counterpart file. But when I tried to run
I'm getting lot of Typescript compilation errors... 😕 |
@awongCM this brings some memories. I vaguely recall getting into some TypeScript issues that I did not know how to solve and wanted to add the lb4 sample. So I guess these might have been it :-D I am not sure I can help you with the TypeScript errors, but I will ask you all the same. How can I help? |
Interesting. Odd thing is that I never run into any problems when cloning the loopback4 examples as a separate project; followed the tutorial; convert the main lambda wrapper to Typescript. It works fine there after. Perhaps there's some config settings from either tsconfig.json or similar that's not liking here... |
Hi,
I've followed the loopback 4 example for this and I really like how you have the framework to play nicely with serverless framework when following the tutorial!
The thing I'm confused about is the lambda wrapper js file.
https://github.com/botbits/serverless-loopback/blob/master/examples/lb4-express/src/lambda-wrapper.js
Could it not have been better to rewrite it in Typescript in the following:
That way, you don't need to configure tsconfig.json to include raw JS files as part of the build process and you only have Typescript files to work with, not JS/Typescript files combo..
I'm just curious what's your rationale is keeping both JS and Typescript this way.
The text was updated successfully, but these errors were encountered: