LogoLogo
Cql
  • AZU
  • Prologue
  • Getting Started
    • Installation
    • Create new app
    • Understnding your project
    • Configuration
  • Endpoints
    • Params
    • Response
    • Contracts
  • Templating
    • Markup
    • Crinja Templates
    • Live Rendering
  • Session Management
  • Validations
  • Internationalization (I18n)
  • Mailers
Powered by GitBook
On this page
  • Model View Controller
  • Custom Directory Structure

Was this helpful?

Export as PDF
  1. Getting Started

Understnding your project

When we use crystal init app my_app to generates a new Azu application, it generated an empty Crystal App directory structure.

~/workspaces/my_app master
❯ tree
.
├── LICENSE
├── README.md
├── shard.yml
├── spec
│   ├── my_app_spec.cr
│   └── spec_helper.cr
└── src
    └── my_app.cr

2 directories, 6 files

Many frameworks build a default directory structure to start with. Azu does not implement a default set of conventions, and instead provides you with patterns that fits best your needs.

Model View Controller

~/workspaces/my_app master
❯ tree
.
├── LICENSE
├── README.md
├── shard.yml
├── spec
│   ├── my_app_spec.cr
│   └── spec_helper.cr
└── src
    └── my_app.cr
    └── endpoints
    └── models
    └── views

2 directories, 6 files

Custom Directory Structure

~/workspaces/joobq_gui master
❯ tree src
src
├── channels
│   └── charts_channel.cr
├── components
│   ├── commons.cr
│   ├── duration_counter.cr
│   ├── errors_counter.cr
│   ├── jobs_counter.cr
│   ├── jobs_table.cr
│   ├── latency_counter.cr
│   ├── processing_chart.cr
│   ├── processing_counter.cr
│   └── queues_table.cr
├── config
│   └── joobq.cr
├── dashforge.cr
├── endpoints
│   ├── dashboard.cr
│   ├── jobs.cr
│   ├── queues.cr
│   ├── scheduler.cr
│   └── static.cr
├── jobs
│   ├── email_job.cr
│   ├── fail_job.cr
│   └── test_job.cr
└── pages
    ├── dashboard
    │   └── index_page.cr
    ├── jobs
    │   └── show_page.cr
    ├── queues
    │   ├── show_page.cr
    │   └── traces_page.cr
    └── scheduler
        └── index_page.cr

10 directories, 25 files
PreviousCreate new appNextConfiguration

Last updated 2 years ago

Was this helpful?