api.kakuzei.com provides a REST API for accessing pictures.
- Docker
- Ruby 3.4.1 with bundler
Install the Ruby dependencies by executing the following command:
bundle install
Load a sample of pictures with tags by executing the following command:
bundle exec rake kakuzei:init
- it creates the datamodel,
- it imports the pictures definition from the data/pictures.yml file,
- it imports the tags definition from the data/tags.yml file.
Start the server by executing the following command:
bundle exec falcon
Build a docker image by executing the following command:
docker build -t kakuzei/api.kakuzei.com .
Start the REST API by executing the following command:
docker run -d -p 9292:9292 kakuzei/api.kakuzei.com
You can use a custom data folder using the --mount argument:
docker run -d -p 9292:9292 --mount type=bind,source=./data,target=/app/data --env SECRET_KEY_BASE=secret kakuzei/api.kakuzei.com
Execute the unit tests by executing the following command:
bundle exec rake db:migrate RAILS_ENV=test
bundle exec rake spec
This project is licensed under the MIT license. See the LICENSE file for more info.