Simple Elixir web API for extracting files from tar archives. Built with Ace and Raxx, provides a gzip-compressed extraction endpoint via HTTP.
Install Dependencies
mix deps.getRun Server
mix run --no-haltServer starts on port 8051.
Health check endpoint:
GET /health
Returns plain text ok.
Extraction endpoint:
GET /extract-from-tar?filename=path/to/file&tarpath=/path/to/archive.tar
Response is gzip-compressed file content (application/octet-stream).
Single-file implementation in lib/pmc_tars_api.ex:
- PMCTarsAPI - Raxx.SimpleServer handler pattern-matching GET requests
- extract_file/2 - System.cmd wrapper executing
tar -xf --to-stdout - PMCTarsAPI.Application - OTP Application supervising Ace.HTTP.Service on port 8051
Format code: mix format
Run tests: mix test
Compile: mix compile