Skip to content

Instantly share code, notes, and snippets.

@trevorturk
Created August 23, 2023 18:05
Show Gist options
  • Save trevorturk/0ef612e365e033549d3a30aa5947ae5c to your computer and use it in GitHub Desktop.
Save trevorturk/0ef612e365e033549d3a30aa5947ae5c to your computer and use it in GitHub Desktop.
#!/usr/bin/env -S falcon host
# frozen_string_literal: true
load :rack
hostname = File.basename(__dir__)
port = ENV["PORT"] || 3000
rack hostname do
append preload "preload.rb"
cache false
count ENV.fetch("FALCON_COUNT", 1).to_i
endpoint Async::HTTP::Endpoint.parse("http://0.0.0.0:#{port}").with(protocol: Async::HTTP::Protocol::HTTP11)
end
# frozen_string_literal: true
require_relative "config/environment"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment