Jets is Rack compatible, both locally and remotely on AWS Lambda.
What does Rack Compatibility mean?
Rack is standard interface to build web applications in Ruby. Being Rack compatible means that Jets works according to the Rack standard. This allows you to use other Rack components like middleware with Jets. Interestingly, this also allows you to run Jets on any rack compatible server like puma or unicorn. So you could run your Jets web application on traditional EC2 servers if desired. Though Jets is built for the serverless world and AWS Lambda.
If you are testing the Jets controller from the Lambda console, you don’t really notice this as the Rack response is converted back to the AWS Lambda AWS Proxy hash structure by the time it returns.
Locally when you run
jets server, it starts up a rackup server and runs it through the same set of Rack middlewares.
Pro tip: Use the <- and -> arrow keys to move back and forward.