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:
- Create the app:
cd example-ruby-memcache
apc app create ruby-memcache- Create the memcache service:
apc service create memcachedb --type memcache- Bind the application to the new service:
apc service bind memcachedb --app ruby-memcache- Start the app:
apc app start ruby-memcache- 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