Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/launchdarkly/hello-bootstrap-rails
Hello LaunchDarkly for bootstrapping in Rails
https://github.com/launchdarkly/hello-bootstrap-rails
examples feature-flags feature-toggles javascript launchdarkly launchdarkly-demo launchdarkly-sdk managed-by-terraform rails ruby sdk-examples
Last synced: 3 months ago
JSON representation
Hello LaunchDarkly for bootstrapping in Rails
- Host: GitHub
- URL: https://github.com/launchdarkly/hello-bootstrap-rails
- Owner: launchdarkly
- License: apache-2.0
- Created: 2019-01-10T19:18:58.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-02-28T19:18:18.000Z (4 months ago)
- Last Synced: 2024-02-29T19:57:43.535Z (4 months ago)
- Topics: examples, feature-flags, feature-toggles, javascript, launchdarkly, launchdarkly-demo, launchdarkly-sdk, managed-by-terraform, rails, ruby, sdk-examples
- Language: Ruby
- Homepage:
- Size: 64.5 KB
- Stars: 0
- Watchers: 53
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-launchdarkly - Rails Hello LaunchDarkly
README
# LaunchDarkly sample Rails application with bootstrapping
We've built a simple Rails app that demonstrates LaunchDarkly bootstrapping.
We modified and/or added the following files to create this example:
- app/views/hello_world/index.html.erb
- app/controllers/hello_world_controller.rb
- config/puma.rbRails created the rest of the files and they are unmodified.
Below, you'll find the build procedure. To learn more about the Ruby SDK, read the [Ruby SDK reference](https://docs.launchdarkly.com/sdk/server-side/ruby).
## Build instructions
Make sure you have Ruby installed. Then, clone the repository, set the `LD_SDK_KEY` and `LD_CLIENTSIDE_ID` environment variables, and start your local server. Here's how:
```sh
$ git clone [email protected]:launchdarkly/hello-bootstrap-rails.git # or clone your own fork
$ cd hello-bootstrap-rails
$ export LD_SDK_KEY=YOUR-SDK-KEY
$ export LD_CLIENTSIDE_ID=YOUR-CLIENTSIDE-ID
$ bundle install
$ bin/rails db:migrate
$ bin/rails server
```Your app should now be running on [localhost:3000](http://localhost:3000/).
Your app should display a JSON representation of all flags in the project and environment associated with your SDK key and Client-side ID, with the values served for both the normal client and the bootstrapped client for the example user context.