May 2021 Update:
I've decided to suspend work on a Rails-specific integration for Bridgetown until further notice. Bridgetown does currently have an outstanding PR for switching to Puma/Rack/Roda for essential routes, and you absolutely can mount a Rails API right onto that however you wish. But in light of recent events, I will not personally be working on a Rails integration solution.
bridgetown-plugin-nano (WIP)
One-step commands to install and configure a Rails-based Nano API backend for Bridgetown
Installation
Run this command to add this plugin to your site's Gemfile:
$ bundle add bridgetown-plugin-nano -g bridgetown_plugins
Usage
$ bundle exec bridgetown nano new
To deploy to production you'll need a SECRET_KEY_BASE
env var. You can generate one with this command:
$ bundle exec bridgetown nano exec secret
Testing
- Run
bundle exec rake
to run the test suite - Or run
script/cibuild
to validate with Rubocop and test together.
Contributing
- Fork it (https://github.com/bridgetownrb/bridgetown-nano-plugin/fork)
- Clone the fork using
git clone
to your local development machine. - Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request