This project provides an escript which does the following
- copy all packages from hex.pm to a local directory
- run a webserver which can be used as a HEX_MIRROR/HEX_CDN
- continue to sync packages from hex.pm as long as it is running
% rebar3 escriptize
% sudo cp _build/default/bin/hexen /usr/bin
% mkdir hex.pm
% cd hex.pm
% hexen
The escript will start a web server on port 31337, so you can then use
% HEX_CDN=http://127.0.0.1:31337/ rebar3
or
% HEX_MIRROR=http://127.0.0.1:31337/ mix
to pull packages from the local hex mirror.
To stop the server, just control-C.