Experimental code reloading for Hanami.
1. Setup Hanami project
gem install hanami hanami new bookshelf && cd bookshelf
2. Prepare Gemfile
- Add the following lines
group :plugins do gem "hanami-reloader", "~> 0.3" end
3. Setup hanami-reloader
bundle bundle exec hanami generate reloader
Now you can start the server via
bundle exec hanami server.
If you're upgrading from
.hanami.server.guardfile instead of
If you're using
puma, I strongly suggest to use
guard-puma alongside with
guard-puma to your
group :development do gem "guard-puma" end
Then change the group name in
-guard "rack", port: ENV["HANAMI_PORT"] || 2300 do +guard "puma", port: ENV["HANAMI_PORT"] || 2300 do
Now start the server as usual:
bundle exec hanami server
After checking out the repo, run
bin/setup to install dependencies. You can also run
bin/console for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run
bundle exec rake install. To release a new version, update the version number in
version.rb, and then run
bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the
.gem file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/jodosha/hanami-reloader.
Copyright © 2017-2018 Luca Guidi – Released under MIT License