Get Computers To Solve Your Problems
The world is in a bit of a state at the moment. People are panicking and they're scared. Far be it for me to suggest that poor leadership might be at least partly to blame. I never learn lessons from other people's mistakes so how can I expect the people who run the country to do it?
This isn't a post about politics. It's about solving a really specific problem. Really specific.
A supermarket in this country is using a queueing feature to let people have access to their site. There are so many ways that this is broken, but assuming that this is trying to solve every problem presented by 100,000 people trying to panic buy alcohol and toilet paper, is short-sighted. This allows said supermarket to keep their core service alive so that at least some people can use it. Ideal? Not really, but some people being able to use a thing is better than no people being able to use a thing.
Disclaimer: this approach does not mean you're going to get a delivery slot. These queueing systems are designed to stop people hammering the core service. They're not designed to let people in one at a time so that everyone gets a slot. This is a demonstration of an idea that solves a very specific problem and nothing more. You should not use this approach if you need food, as it will not work.
This gets minified, then set as a bookmark in your browser so it can easily be triggered on the page. You could also run it in your console, but that's pretty nerdy. It's not pretty, but quick things tend not to be.
The backend is fairly self-explanatory. We boot an Express server (because that's what I had running), mount an endpoint, check a password, and trigger a call to Twilio. We don't need a handling of the response. We're going to assume it runs fine since this is just a proof of concept.