Quick Start
Prerequisites
Step 1: Create a New Project
azu new my_blog --database postgresStep 2: Navigate and Explore
cd my_blogmy_blog/
├── src/
│ ├── my_blog.cr # Main application
│ ├── server.cr # Server configuration
│ ├── endpoints/ # HTTP handlers
│ ├── models/ # Database models
│ ├── requests/ # Request validation
│ ├── pages/ # Response pages
│ ├── services/ # Business logic
│ └── db/
│ ├── migrations/ # Database migrations
│ └── schema.cr # Auto-generated schema
├── spec/ # Tests
├── public/ # Static assets
└── shard.yml # DependenciesStep 3: Set Up the Database
Step 4: Start the Server
Step 5: Generate a Resource
Step 6: Run the Migration
Step 7: View Your Application
Generated Code Examples
Model
Endpoint
Request
Run Tests
Next Steps
Troubleshooting
Server Won't Start
Port Already in Use
Database Connection Error
Last updated