HUB
Sign inSign up
micro-tmp-storage logo

telemark/micro-tmp-storage

By telemark

•Updated over 6 years ago

Temporary key/value store

Image
0

1.9K

telemark/micro-tmp-storage repository overview

Build Status js-standard-style

⁠micro-tmp-storage

Microservice for storing key/value data temporarily.

Default ttl is 60 seconds

⁠API

⁠POST

value value to store ttl ttl in seconds (optional, defaults to 60)

$ curl -d '{"value": "My secret, temporary value", "ttl": "30"}' https://tmp.storage.t-fk.win

returns

{
  key: 'b72545e8-6b58-4672-ad87-4096bb9da778',
  value: 'My secret, temporary value',
  ttl: 30,
  success: true
}
⁠GET
⁠/storage/{key} or /{key}
$ curl https://tmp.storage.win/storage/b72545e8-6b58-4672-ad87-4096bb9da778

returns 200 ok on success

{
  key: 'b72545e8-6b58-4672-ad87-4096bb9da778',
  value: 'My secret, temporary value'
}

returns 404 not found on failure

{
  key: 'b72545e8-6b58-4672-ad87-4096bb9da778',
  value: false
}

⁠Environment

MONGODB_CONNECTION=your-mongodb-connection-string
MONGODB_COLLECTION=your-mongodb-collection-name
MONGODB_NAME=your-mongodb-db-name

⁠License

MIT⁠

Tag summary

Content type

Image

Digest

Size

19.2 MB

Last updated

over 6 years ago

docker pull telemark/micro-tmp-storage