Installation
Avleon installation
Avleon requires Node.js 20 or newer.
Using Cli
If you already installed @avleon/cli globally then run the following command:
else you can install using npx:
The CLI asks which package manager to use and which features to include — OpenAPI docs, CORS, TypeORM, Knex and Scalar UI — then scaffolds the project and installs its dependencies.
The app starts on http://localhost:4000, and with OpenAPI enabled the docs are
served at /docs.
What you get
| Script | Description |
|---|---|
start:dev | Start the dev server with hot reload |
build | Compile TypeScript to JavaScript |
start | Start the production server |
test | Run unit tests |
Manual
Go to your desired project directory and run the following commands:
class-validator, class-transformer and reflect-metadata come with
@avleon/core, so you do not need to install them separately.
Ensure experimentalDecorators and emitDecoratorMetadata are enabled in
tsconfig.json — Avleon's decorators do not work without them.
Then add a minimal entry point:
You can still use the CLI's generators and dev server in a manually created project by installing it locally:
Optional dependencies
Install these only for the features you use:
| Feature | Package |
|---|---|
| TypeORM | typeorm + a driver (pg, mysql2, sqlite3, …) |
| Knex | knex + a driver |
| Queues | bullmq, ioredis |
| Websockets | socket.io |
| Kafka broadcasting | kafkajs |
| Image handling | sharp |