Skip to content

SkyeAv/PMCTarsAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages