anycook-api
REST Api for anycook
Documentation
A detailed API documentation can be found here (still in progress).
Test environment
To use the full test stack you will also need to clone and start the anycook-page project.
Required dependencies
- Install Java7 JDK
- Install Gradle. To install it via brew execute
brew install gradle
. - Install Virtual Box
- Install Vagrant (Having problems with vagrant in OSX Mavericks? Execute
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
and try again (source)) - Execute
git submodule init && git submodule update
in project root to download required submodules. These are:
Configuration
TODO Available properties can be found here.
If you want to set your own global conf in the test environment place it in the project as test-environment/api-manifests/anycook.properties
Starting
- Compile Java sources with
$ gradle war
- Run
$ vagrant up --provision
in project root directory. - The anycook API can be accessed on http://localhost:8080. The MySQL server via port 3333
Adding database data
- The puppet scripts create two MySQL databases. 'anycook_db' is the main database. 'zombiecooking_db' is only created to import old db data.
- You can import a db schema by
- using a terminal command:
$ mysql -P 3333 -u root anycook_db < sql-file.sql
- using MySQL Workbench (can be downloaded here)
- In the menu 'Database' select 'Connect to Database...'
- Change the port to 3333 and click OK
- Load the latest testdump. (For anycook internals: Latest dump is located in the root of the BTSync folder)
- Click on the lighning symbol
- using a terminal command:
Adding user and recipe images
- Copy image folders from btSync into
./images
in project root.