Skip to content

Latest commit

 

History

History
100 lines (67 loc) · 1.91 KB

README.md

File metadata and controls

100 lines (67 loc) · 1.91 KB

adept it to your needs

Your awesome API

A Grape API mounted on Rack, starting point for API development with Grape. It also includes grape-swagger for documentation generating.

Usage

All following commands can and should be adapted/replaced to your needs.

Setup

$ ./script/setup

Test

$ ./script/test

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

… dependencies

$ ./script/update

Stop

… would only be used, if server started in production mode

$ ./script/stop

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 awesome_api .
  • run: docker run -it -p 9292:9292 --rm awesome_api

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/name/repo.

License

The gem is available as open source under the terms of the MIT License.