Skip to content

Latest commit

 

History

History
57 lines (35 loc) · 1.05 KB

README.md

File metadata and controls

57 lines (35 loc) · 1.05 KB

PMCTarsAPI

Version 0.1.1

Simple Elixir web API for extracting files from tar archives. Built with Ace and Raxx, provides a gzip-compressed extraction endpoint via HTTP.

Usage

Install Dependencies

mix deps.get

Run Server

mix run --no-halt

Server 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).

Architecture

Single-file implementation in lib/pmc_tars_api.ex:

  1. PMCTarsAPI - Raxx.SimpleServer handler pattern-matching GET requests
  2. extract_file/2 - System.cmd wrapper executing tar -xf --to-stdout
  3. PMCTarsAPI.Application - OTP Application supervising Ace.HTTP.Service on port 8051

Development

Format code: mix format

Run tests: mix test

Compile: mix compile

Contributors

Skye Lane Goetz

Gwênlyn Glusman