The Wine Cellar application is documented here.
This application provides an example of:
- Building a complete RESTful API in PHP using the Slim framework.
- Consuming these services using jQuery
Set Up:
-
Create a MySQL database name "cellar".
-
Execute cellar.sql to create and populate the "wine" table:
mysql cellar -uroot < cellar.sql
-
Deploy the webapp included in this repository.
-
Open api/index.php. In the getConnection() function at the bottom of the page, make sure the connection parameters match your database configuration.
-
Open main.js and make sure the rootURL variable matches your deployment configuration.
-
Access the application in your browser. For example: http://localhost/cellar."# cellar" "# cellar" "# cellar" "# cl"