AzuraJS Logo
AzuraJSFramework
v2.2 Beta

Installation

Install AzuraJS in your project

Installation πŸ“¦

Get started with AzuraJS by installing it in your Node.js or Bun project.

Prerequisites βœ…

Before installing AzuraJS, make sure you have:

  • Node.js 18+ or Bun 1.0+
  • TypeScript 5.0+ (recommended)
  • A package manager: npm, yarn, pnpm, or bun

Installation Methods

Using npm

npm install azurajs

Using Yarn

yarn add azurajs

Using pnpm

pnpm add azurajs

Using Bun

bun add azurajs

TypeScript Configuration πŸ”§

AzuraJS requires experimental decorators to be enabled. Update your tsconfig.json:

tsconfig.json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true
  }
}

Key Configuration Options

experimentalDecorators: Enables TypeScript decorators support (required for @Controller, @Get, etc.)

emitDecoratorMetadata: Enables metadata reflection (recommended for advanced features)

Project Setup πŸ—οΈ

Create a new project structure:

mkdir my-azura-app
cd my-azura-app
npm init -y
npm install azurajs

Create basic files:

my-azura-app/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts
β”‚   └── controllers/
β”‚       └── AppController.ts
β”œβ”€β”€ azura.config.ts
β”œβ”€β”€ tsconfig.json
└── package.json

Verify Installation βœ”οΈ

Create a simple test file to verify everything is working:

src/index.ts
import { AzuraClient } from "azurajs";

const app = new AzuraClient();
console.log("βœ… AzuraJS installed successfully!");

Run it:

# With Node.js
npx tsx src/index.ts

# With Bun
bun run src/index.ts

If you see the success message, you're ready to go! πŸŽ‰

Development Dependencies (Optional) πŸ“š

For a better development experience, consider installing:

# TypeScript and type definitions
npm install -D typescript @types/node

# Development server with hot reload
npm install -D tsx nodemon

# or use Bun's built-in watch mode
bun --watch src/index.ts

Next Steps πŸš€

Now that AzuraJS is installed, you're ready to:

Troubleshooting πŸ”

Decorator Errors

If you get errors about decorators not being recognized:

  1. Make sure experimentalDecorators is enabled in tsconfig.json
  2. Verify you're using TypeScript 5.0 or higher
  3. Check that your editor is using the workspace TypeScript version

Import Errors

If you can't import from azurajs:

  1. Verify the package is installed: npm list azurajs
  2. Try deleting node_modules and reinstalling
  3. Clear your TypeScript cache: rm -rf .tsbuildinfo

Type Errors

For type-related issues:

  1. Make sure @types/node is installed
  2. Set "moduleResolution": "bundler" or "node16" in tsconfig
  3. Enable esModuleInterop and skipLibCheck

Need help? Check our GitHub Issues or start a Discussion!

On this page