Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions rubyonrails/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

#Cors
gem 'rack-cors', :require => 'rack/cors'
3 changes: 3 additions & 0 deletions rubyonrails/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ GEM
puma (4.3.3)
nio4r (~> 2.0)
rack (2.2.2)
rack-cors (1.1.1)
rack (>= 2.0.0)
rack-proxy (0.6.5)
rack
rack-test (1.1.0)
Expand Down Expand Up @@ -183,6 +185,7 @@ DEPENDENCIES
listen (>= 3.0.5, < 3.2)
mysql2 (>= 0.4.4)
puma (~> 4.1)
rack-cors
rails (~> 6.0.2, >= 6.0.2.2)
sass-rails (>= 6)
spring
Expand Down
10 changes: 9 additions & 1 deletion rubyonrails/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,13 @@ class Application < Rails::Application

# Don't generate system test files.
config.generators.system_tests = nil

config.middleware.insert_before 0, Rack::Cors do
allow do
origins '*'
resource '*', :headers => :any, :methods => [:get, :post, :options]
end
end

end
end
end
23 changes: 20 additions & 3 deletions stack_box.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,23 @@ echo "######## SELECT YOUR STACK #############\n"

stack=()

PS3='Select your frontend: '

echo "FRONTEND OPTIONS:"

frontend_options=("Vue")
select opt in "${frontend_options[@]}"
do
case $opt in
"Vue")
echo "You've chosen Vue"
stack+=("vue")
break;
;;
*) echo "Invalid option $REPLY";;
esac
done

PS3='Select your backend: '

echo "BACKEND OPTIONS:"
Expand All @@ -24,12 +41,12 @@ do
stack+=("flask")
break;
;;
"Option 2")
"Rails")
echo "You've chosen Rails"
stack+=("rubyonrails")
break;
;;
*) echo "invalid option $REPLY";;
*) echo "Invalid option $REPLY";;
esac
done

Expand Down Expand Up @@ -76,7 +93,7 @@ do
"Done")
break
;;
*) echo "invalid option $REPLY";;
*) echo "Invalid option $REPLY";;
esac
done

Expand Down