Getting Started
Installation
The quickest way to create a new CanxJS app is using create-canx, which sets up everything for you automatically, including **Tailwind CSS**.
Prerequisites
- Bun 1.0+— CanxJS is built specifically for Bun runtime
- Node.js 18+— Required for some tooling compatibility
Don't have Bun installed?
curl -fsSL https://bun.sh/install | bashQuick Start
$
bunx create-canx my-appThis will create a new directory called my-app with a complete CanxJS project.
Interactive Setup
The CLI will guide you through the setup process with interactive prompts to customize your project:
? What project type do you want to create?
❯ Fullstack (MVC)
API Only
Microservice
? Which language do you want to use?
❯ TypeScript
JavaScript
? Which database do you want to use?
❯ MySQL
PostgreSQL
SQLite
? Do you want to use Prisma ORM?
❯ Yes
No
Project Types
- MVC: Full-stack with views & controllers
- API: REST API structure without views
- Microservice: Minimal setup for microservices
Features
- • TypeScript (Recommended) or JavaScript
- • Built-in Database Support (MySQL, PG, SQLite)
- • Optional Prisma Integration
- • Automatic Docker setup
Project Templates
🏗️
MVC Project
Full MVC structure with views
bunx create-canx my-app ⚡
API Only
REST API without views
bunx create-canx my-app --api🔧
Microservice
Minimal microservice setup
bunx create-canx my-app --microProject Structure
project-structure
my-app/├── src/│ ├── controllers/ # Route controllers│ ├── models/ # Database models│ ├── views/ # JSX view templates│ ├── routes/ # Route definitions│ ├── middlewares/ # Custom middlewares│ ├── config/ # Configuration files│ └── app.ts # Application entry├── public/ # Static assets├── storage/ # File storage├── .env # Environment variables└── package.json
Running Your App
Terminal
$
Your app will start at http://localhost:3000