In order not to require extensive coding resources for coding websites, democratech makes an extensive use of web services behind the scene, most notably:
- Bime for analytics and dashboards
- Front for shared inbox
- Wufoo for forms
- Slack for communication / notifications
- Mailchimp for emailing
Nevertheless, we needed an API of ours (think "Zapier") to properly synchronize all those services.
The services API is located on the green "Supporteurs" node.
The Services API is written in Ruby and leverages the Grape API framework. The Webserver used is Unicorn (behing nginx).
- Make sure your run
bundle install
to make sure all dependencies get installed - Create a
config/keys.local.rb
file with all the necessary information (cfconfig/keys.rb
) - launch the unicorn server with the following command:
bundle exec unicorn -c config/unicorn.conf.rb config/config.ru
Alternatively for development purposes, you can also just run the Services API with rackup to use the default WEBRick web server:
rackup config/config.ru
You can test that the Services API is up and running by calling:
curl http://127.0.0.1:9292/api/v1/test
It should return an HTTP 200 OK
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
So far, democratech's Services API is being developed and maintained by
- democratech Services API is released under the GNU Affero GPL
- Grape is released under a Free Software license.