Svarta
Svarta is a TypeScript-native, ESM-native platform-agnostic REST API framework.
By abstracting the underlying platform, it allows deployment to different platforms without changing your code.
You also get:
- file-based routing, similar to Astro, Next.js or SvelteKit
- type-safe middlewares
- input validation (with Zod)
- dependency bundling (treeshaking etc.)
- CLI to scaffold projects
- development server with HMR
- MIT license
It aims to provide a more robust developer experience than established packages like Express or Koa, while being lightweight and hassle-free when using TypeScript.
Svarta will scaffold your application from the ground up, removing the overhead of installing and setting up development dependencies, toolchains and build scripts. Say goodbye to decision fatigue and setting up 15 packages to get your Express project started!
Quick start
pnpm create svarta-apppnpm create svarta-appyarn create svarta-appyarn create svarta-appnpm create svarta-appnpm create svarta-appThen, start the development server:
pnpm devpnpm devyarn devyarn devnpm run devnpm run devThe default project contains an index.html file that is served as / and an API route that returns a text, which will be inserted into the HTML page.
Check out Concepts to learn how to create routes.