This is just a proof of concept right now, but I basically want to create a little dashboard in ther browser that will follow live baseball games and, in real-time, show the probabilities of each outcome of each player's next at-bat. Then you can look at the numbers of your chart for who's about to be up and easily to compare it to bets available at your sportsbook, and this should then allow you to always bet at a theoretical advantage.
Welp, we're going to look at some nodejs code for and aws lambda function here, and specifically the code will be invoking a different lambda function. Although there are a few ways to do this, I really wanted to find a way of chaining lambdas such that they don't have to wait for the one one they just called to finish. It's a bit confusing, but maybe with some example you'll understand what I mean. Well then let's dive right in!
This is something that tripped me up a little bit when I was recently playing around with DynamoDB. I was very confused because in the callback function the data argument was just coming back as an empty object. "Surely that can't be right", I thought, but indeed it was right!
Well guys, I learned a cool new thing today! Did you know about the "it.only" syntax in mocha? Can you believe I just discovered it today?! Yep, my life has forever changed for the better now that I'm aware of in.only, and since you're reading this post right now I hope it will change yours too!
Things like this are what make it difficult to argue that AWS isn't still the leader in serverless. When we say, "a Lambda function" then sure, we could just expose one function. With the nodejs package aws-serverless-express you can easily handle lots of different endpoints that may or may not have query parameters as well. To me this makes my lambda functions a lot more logically organized as routes.
The posts on this site are written and maintained by Jim Lynch. About Jim...