This project is the API that powers shuff.io. The tech stack includes:
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.
$ ./script/setup
Installs dependencies
$ ./script/test
Runs tests
$ ./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)
$ ./script/update
Updates dependencies
$ ./script/stop
Stops server if run in production mode
rake routes
rake oapi:fetch
rake oapi:validate
comming from: grape-swagger
Rake Tasks
- build:
docker build -t shuffio-api .
- run:
docker run -it -p 9292:9292 --rm shuffio-api