-
Ensure you run
bundle install
, andrake db:setup
, prior torails s
-
Your API should now be running on
localhost:3000
. To test it out, try adding the endpoints below:
- retrieves all menu, by default, name sorted in ascending order
- e.g:
http://localhost:3000/api/v1/menus
- retrieves all menu with names that contain the
searchQuery
- e.g:
http://localhost:3000/api/v1/menus?q=pizza
- sortKey can be
name
orprice
- orderKey can be
asc
ordesc
- e.g:
http://localhost:3000/api/v1/menus?sort_by=name&order_by=asc
- retrieves all menu with names that contain the
searchQuery
- search result will be sorted according to the order and sort key
- sortKey can be
name
orprice
- orderKey can be
asc
ordesc
- e.g:
http://localhost:3000/api/v1/menus?q=pizza&sort_by=name&order_by=asc