Template of a custom feed generator service for the Bluesky network in Ruby
1Dir[File.join(__dir__, 'feeds', '*.rb')].each { |f| require(f) }
2
3require 'blue_factory'
4require 'sinatra/activerecord'
5
6ActiveRecord::Base.connection.execute "PRAGMA journal_mode = WAL"
7
8BlueFactory.set :publisher_did, 'did:plc:<your_identifier_here>'
9BlueFactory.set :hostname, 'feeds.example.com'
10
11# uncomment to enable authentication (note: does not verify signatures)
12# see Feed#get_posts(params, visitor_did) in app/feeds/feed.rb
13# BlueFactory.set :enable_unsafe_auth, true
14
15BlueFactory.add_feed 'build', BuildInPublicFeed.new
16BlueFactory.add_feed 'linux', LinuxFeed.new
17BlueFactory.add_feed 'starwars', StarWarsFeed.new