We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Running your own Hex server
almirsarajcic
0 comments
Copy link
Whatever the reason, you might want to run your local Hex server and install a dependency that way. Here’s a quick way to do it.
# prepare the dir
mkdir -p acme/public/tarballs
# build your package
mix hex.build
# host your package
cd acme
cp ../pack-0.1.0.tar public/tarballs/
openssl genrsa -out private_key.pem
mix hex.registry build public --name=acme --private-key=private_key.pem
mix hex.repo add acme http://localhost:8000 --public-key=public/public_key
erl -s inets -eval 'inets:start(httpd,[{port,8000},{server_name,"localhost"},{server_root,"."},{document_root,"public"}]).'
# add to mix.exs file
{:pack, "~> 0.1", repo: "acme"}
TA-DA 🎉
Here’s more about it:
copied to clipboard
Comments (0)
Sign in with GitHub to join the discussion