How to install Hanami
suggest change- Step 1: Install the Hanami gem.
$ gem install hanami
- Step 2: Generate a new project and set RSpec as the test framework.
$ hanami new myapp --test=rspec
By default Hanami uses Minitest.
This creates a Hanami application called myapp in a myapp directory and installs the gems listed in the Gemfile.
$ cd myapp
$ bundle install
The myapp directory has a number of auto-generated files and folders that make up the structure of a Hanami application. Following is a list of files and folders that are created by default:
- Gemfile defines our Rubygems dependencies (using Bundler).
- Rakefile describes our Rake tasks.
- apps contains one or more web applications compatible with Rack. Here we can find the first generated Hanami application called Web. It’s the place where we find our controllers, views, routes and templates.
- config contains configuration files.
- config.ru is for Rack servers.
- db contains our database schema and migrations.
- lib contains our business logic and domain model, including entities and repositories.
- public will contain compiled static assets.
- spec contains our tests.
- Important links.
Hanami gem https://github.com/hanami/hanami
Hanami official Getting Started http://hanamirb.org/guides/getting-started/
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents