First you require to add the amber shard dependency in your shard.yml file:
name:myappversion:0.1.0authors: - Foo Bar <foo@bar.baz>targets:myapp:main:src/myapp.crcrystal:0.24.2license:MITdependencies:amber:github:amberframework/amberversion:0.7.2
First you need a config/folder with an application.cr file, also see configuration.
Secondly a routes.cr file with pipelines and routes blocks, also see: routing.
Then a basic setup (without views nor models) requires an application_controller.cr file inside src/controllers directory.
Finally you need to call Amber::Server and all your project in your main myapp.crfile.
Build and run your project
To compile your project use shards build myappand run the executable with bin/myapp.
$ shards build myapp
Dependencies are satisfied
Building: myapp
$ bin/myapp
06:52:37 Server | (INFO) Amber 0.7.2 serving application "Amber_app" at http://localhost:3000
06:52:37 Server | (INFO) Server started in development.
06:52:37 Server | (INFO) Startup Time 00:00:00.000273000
That's it!, now you're ready to create any basic project from scratch without Amber CLI.
Local CLI
As additional step you can compile an amber CLI inside your project using: