Create new app
Learn how to get started with Azu and build applications
Last updated
Was this helpful?
Learn how to get started with Azu and build applications
Last updated
Was this helpful?
Let's get a Azu application up and running as quickly as possible.
We can run crystal init app my_app
from any directory in order to bootstrap our Azu application. Assuming that the name of our application is my_app
, let's run the following command:
shard.yml
Open your /my_app/shard.yml in your favorite editor and add the azu dependency
Now install Azu by running shards install
from the terminal
Now that you have install Azu, lets enable it in your project. Open /my_app/src/my_app.cr
With the simple include azu
you have unlocked the benefits of Azu for your project.
Name
MyApp.configure
MyApp.log
This is the application logger and uses Crystal built in logger by default
MyApp.env
Allows you to work with the application current environment Production, Development, Staging, etc.
MyApp.config
Gets your application configuration for easy access from other parts of the code base
MyApp.start
Starts the HTTP server
Accepts a block and allows you to define Azu