service for up-/downloading artifacts
Clone this repository and run the start script
$ git clone https://github.com/thomn/sourcemap-service.git
$ cd sourcemap-service
$ npm run start
- GET:
/artifact/[id]
: -> get artifact by id - POST:
/artifact/[id]
: -> upload artifact by id - DELETE:
/artifact/[id]
: -> delete artifact by id - POST:
/artifact/claim
: -> get artifact id
$ curl -X POST http://localhost:4000/artifact/claim -H "Content-Type: application/json" -d "{\"crc\":\"123321\"}"
// rtf:40iki2Ahud1Ig
$ curl -X POST http://localhost:4000/artifact/rtf:40iki2Ahud1Ig -d @script.js.map
$ curl http://localhost:4000/artifact/rtf:40iki2Ahud1Ig --output script.js.map
$ curl "http://localhost:80/healthz"
// ok