Skip to content

Latest commit

 

History

History
82 lines (55 loc) · 1.7 KB

File metadata and controls

82 lines (55 loc) · 1.7 KB

shuff.io API

This project is the API that powers shuff.io. The tech stack includes:

Usage

You'll need Ruby 3.1.3 installed. asdf is recommended to install Ruby versions. Development can instead be done within Docker containers (more details coming soon). Once Ruby is installed, install dependencies by running ./script/setup or bundle install.

Grape Starter gives us some scripts to simplify development. We should update these to suit our needs, along with adding more.

Setup

$ ./script/setup

Installs dependencies

Test

$ ./script/test

Runs tests

Run

$ ./script/server *port (default: 9292)

and go to: http://localhost:port/doc to access the OAPI documentation.

For production, set RACK_ENV=production

$ RACK_ENV=production ./script/server *port (default: 9292)

Update

$ ./script/update

Updates dependencies

Stop

$ ./script/stop

Stops server if run in production mode

Rake Tasks

List Routes

rake routes

OpenApi Documentation and Validation

rake oapi:fetch
rake oapi:validate

comming from: grape-swagger Rake Tasks

Docker

  • build: docker build -t shuffio-api .
  • run: docker run -it -p 9292:9292 --rm shuffio-api