Getting Started
Installation
How to install AxilJS and set up your development environment.
Requirements#
| Requirement | Version |
|---|---|
| Node.js | 18.0.0 or higher |
| npm | 8.0.0 or higher |
| TypeScript | 5.0.0 or higher |
Install the CLI#
bash
npm install -g @AxilJS/cliVerify the installation:
bash
rest --versionCreate a project#
bash
rest create my-apiThis generates a new project with:
- Pre-configured TypeScript
- Standard directory structure
- Sample controller and service
- Environment configuration
.gitignorewith sensible defaults
Project structure#
typescript
my-api/
├── src/
│ ├── main.ts
│ ├── config/
│ │ └── app.config.ts
│ └── modules/
│ └── users/
│ ├── controllers/
│ ├── services/
│ └── users.test.ts
├── package.json
├── tsconfig.json
├── .env
└── .env.exampleInstall dependencies#
bash
cd my-api
npm installStart the server#
bash
rest runThe development server starts with hot reload. Every file save triggers incremental TypeScript compilation and automatic restart.
Tip
Run rest doctor inside your project to check for configuration issues.
Available CLI commands#
bash
rest create <name> # Create a new project
rest run # Start dev server with hot reload
rest build # Compile for production
rest test [pattern] # Run test files
rest deploy # Generate Docker + K8s files
rest install [package] # Install a package
rest doctor # Diagnose project issues