Skip to content

Latest commit

 

History

History
 
 

example-ruby-memcache

This app is a sample ruby app that consumes a memcache service exposed to the app via the MEMCACHE_URI environment variable.

To use this application with a memcache service in Apcera Plaform:

  1. Create the app:
cd example-ruby-memcache
apc app create ruby-memcache
  1. Create the memcache service:
apc service create memcachedb --type memcache
  1. Bind the application to the new service:
apc service bind memcachedb --app ruby-memcache
  1. Start the app:
apc app start ruby-memcache
  1. Set and get values using curl:

Setting value to 1:

curl -X POST http://ruby-memcache.<your-domain>/set/value/1 -d ''

Getting the value of value:

curl http://ruby-memcache.<your-domain>/get/value