Curveball is a micro HTTP framework for Typescript. You can compare it to Express, Koa or Fasify.
Curveball lets you build the same types of applications as these frameworks, but it’s especially well suited to build APIs. It embraces REST, and comes with an number of quality of life features that make building advanced HTTP APIs a joy.
Curveball runs on Node, but it has a very minimal ‘kernel’, which makes it run natively on AWS Lambda and Bun, unlike other frameworks which often don’t work without bulky compatibility layers.
What you need to know
This documentation assumes you have an understanding of the main HTTP concepts such as:
- Requests, including the URL, method, headers and body.
- Responses, including the status, headers and body. (and what they mean)
In most cases this documentation also assumes you know Typescript.
If any of these concepts are foreign, this documentation is likely not a good jumping off point.
Picking an engine
Curveball currently supports a few different runtime engines. They are all a little different, so they each have their own set-up instructions.
Choose your engine to continue this guide.
If you are not sure which to start with, Node is by far the most common.