6 ms·
Feature request: supply .json file via command line to pre-load data into the in-memory database. Taking it even further; how about persisting the data in the
by sgt 5y ago
Feature request: supply .json file via command line to pre-load data into the in-memory database.
Taking it even further; how about persisting the data in the file?
Sometimes your prototype will need some pre-added data so I think this might be useful.
- skhm 5y agoMy first thought too, but I guess it's also very easy to hand-roll an init_data.sh script with a bunch of POST curls to populate the DB.
- aw4y 5y agoexactly!
- lofties 5y agoCan probably do that with some `jq` and CURL magic already!
- aw4y 5y agocurrently there are two implementation for the database "behind": in memory or with postgres, both with zero config (except for starting an instance of postgres, in the second case!). it can be easily extended to use files as persistence, good idea :) regarding the pre-population, you can just make a quick script with curl that will add some data after you run the service. any thought?
- qw 5y agoI have used WireMock in the past that supports pre-defined mocks. It can be run both locally and as a service (I only ran it locally) http://wiremock.org/ http://wiremock.org/ It's more complex than Caffeine, but it has a lot of options. It can also run as a proxy and generate the mocks from actual http requests passing through the proxy