Skip to content

Commit

Permalink
Merge pull request #82 from Shopify/add-proxy-route-instructions
Browse files Browse the repository at this point in the history
Add proxy instructions for non-API routes
  • Loading branch information
paulomarg authored Feb 27, 2023
2 parents 6bfbf8b + 104de9c commit ea84a4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
mount ShopifyApp::Engine, at: "/api"
get "/api", to: redirect(path: "/") # Needed because our engine root is /api but that breaks FE routing

# If you are adding routes outside of the /api path, remember to also add a proxy rule for
# them in web/frontend/vite.config.js

# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

get "/api/products/count", to: "products#count"
Expand Down

0 comments on commit ea84a4f

Please sign in to comment.