From f65e31e7ce837735222e08366835a5ccc6643303 Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" <193874+carols10cents@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:21:59 -0400 Subject: [PATCH] Update README.md Add some context to the commands. --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index c537169..0921c73 100644 --- a/README.md +++ b/README.md @@ -20,12 +20,20 @@ cargo install margo ### Initialize the registry +This will create a new registry in the directory +`my-registry-directory` that you plan to serve from +`https://my-registry.example.com`. + ```bash margo init my-registry-directory --base-url https://my-registry.example.com ``` ### Add a crate to the registry +To add a new crate or version to the registry, run `margo add` and specify +the path to the directory you gave to `margo init` and the `.crate` file +to publish. + ```bash # Acquire a crate package, such as by running `cargo package` margo add --registry my-registry-directory some-crate/target/package/some-crate-1.2.3.crate @@ -33,10 +41,18 @@ margo add --registry my-registry-directory some-crate/target/package/some-crate- ### Serve the registry files with your choice of webserver +For example, using Python and serving the registry in the directory +at `127.0.0.1`: + ```bash python3 -m http.server --bind '127.0.0.1' my-registry-directory ``` +You should be able to visit `127.0.0.1/config.json` in your browser. +Your next step is to serve those files from +`https://my-registry.example.com` instead, in whatever way you +serve static files from whatever URL you've specified. + ### Configure Cargo ```bash