Commit f6b5e73

mo khan <mo@mokhan.ca>
2021-07-11 02:04:25
chore: connect to ngrok
1 parent a970d44
config/environments/development.rb
@@ -58,4 +58,6 @@ Rails.application.configure do
 
   # Uncomment if you wish to allow Action Cable access from any origin.
   # config.action_cable.disable_request_forgery_protection = true
+
+  config.hosts << ENV.fetch('NGROK_HOST')
 end
config/application.rb
@@ -1,5 +1,6 @@
 require_relative "boot"
 
+require "dotenv"
 require "rails"
 require "active_model/railtie"
 require "active_record/railtie"
@@ -8,6 +9,7 @@ require "action_view/railtie"
 require "rails/test_unit/railtie"
 require "primer/view_components/engine"
 
+Dotenv.load(".env.local", ".env.#{Rails.env}", ".env")
 Bundler.require(*Rails.groups)
 
 module Sparkles
config/puma.rb
@@ -21,7 +21,7 @@ end
 
 # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
 #
-#port ENV.fetch("PORT") { 3000 }
+port ENV.fetch("PORT") { 3000 }
 
 # Specifies the `environment` that Puma will run in.
 #
.env
@@ -0,0 +1,1 @@
+NGROK_HOST=invalid.ngrok.io
.gitignore
@@ -38,3 +38,4 @@ yarn-debug.log*
 
 config/*.pem
 Brewfile.lock.json
+.env.local
.ruby-version
@@ -1,1 +1,1 @@
-ruby-3.0.0
+ruby-3.0.1
Gemfile
@@ -1,7 +1,8 @@
 source 'https://rubygems.org'
 
-gem 'gemoji'
-gem 'octicons_helper'
+gem 'dotenv', '~> 2.7'
+gem 'gemoji', '~> 3.0'
+gem 'octicons_helper', '~> 11.3'
 gem 'primer_view_components', '0.0.14'
 gem 'puma', '~> 5.0'
 gem 'rails', '~> 6.1.3'
Gemfile.lock
@@ -63,6 +63,7 @@ GEM
     builder (3.2.4)
     concurrent-ruby (1.1.9)
     crass (1.0.6)
+    dotenv (2.7.6)
     erubi (1.10.0)
     gemoji (3.0.1)
     globalid (0.4.2)
@@ -156,8 +157,9 @@ PLATFORMS
   ruby
 
 DEPENDENCIES
-  gemoji
-  octicons_helper
+  dotenv (~> 2.7)
+  gemoji (~> 3.0)
+  octicons_helper (~> 11.3)
   primer_view_components (= 0.0.14)
   puma (~> 5.0)
   rails (~> 6.1.3)
@@ -165,4 +167,4 @@ DEPENDENCIES
   webpacker (~> 5.0)
 
 BUNDLED WITH
-   2.2.22
+   2.2.23