Okechi Onyeje 86e1dace76 subdomain routing now working to route application to proper app.
- This will need to revamped later on to potentially have a rack app serving the different rails applications and static website.
2017-04-16 16:40:25 -04:00

28 lines
569 B
Ruby

# This file is used by Rack-based servers to start the application.
require_relative 'config/environment'
# require 'rack-proxy'
# class AppProxy < Rack::Proxy
# def rewrite_env(env)
# request = Rack::Request.new(env)
# if request.subdomain == "pearlception"
# env["HTTP_HOST"] = "localhost:3001"
# else
# env["HTTP_HOST"] = "localhost:3000"
# end
# env
# end
# end
# run AppProxy.new
# use Rack::Subdomain, "lvh.me:3000" do
# map 'pearlception', to: "/dashboard/:subdomain"
# #map '', to: "/"
# end
run Rails.application