hauler-dev/hauler

[RFE] Hauler store serve fileserver add port number

Closed this issue · 2 comments

Is this RFE related to an Existing Problem? If so, please describe:

I can see a use case of having multiple hauls to be served from the fileserver. Meaning. If I can create multiple "stores" with -s, --store string Location to create store at (default "store") then why can't I server multiple stores on different ports?

Describe Proposed Solution(s):

Add a flag for which for which port hauler will use for the fileserver. hauler store serve fileserver -p 9090.

Describe Possible Alternatives:

🤷

Additional Context:

I love hauler!

hey @clemenko, you are already able to config the port (and store) of the fileserver... please see below:

zackbradys@Zacks-MBP % hauler version  
 __    __       ___       __    __   __       _______ .______
|  |  |  |     /   \     |  |  |  | |  |     |   ____||   _  \
|  |__|  |    /  ^  \    |  |  |  | |  |     |  |__   |  |_)  |
|   __   |   /  /_\  \   |  |  |  | |  |     |   __|  |      /
|  |  |  |  /  _____  \  |  `--'  | |  `----.|  |____ |  |\  \----.
|__|  |__| /__/     \__\  \______/  |_______||_______|| _| `._____|
hauler: Airgap Swiss Army Knife

GitVersion:    1.0.1
GitCommit:     bb2a8bf
GitTreeState:  clean
BuildDate:     2024-02-27T16:30:03Z
GoVersion:     go1.21.7
Compiler:      gc
Platform:      darwin/arm64
zackbradys@Zacks-MBP % hauler store serve fileserver --help   
Serve the file server

Usage:
  hauler store serve fileserver [flags]

Flags:
      --directory string   Directory to use for backend.  Defaults to $PWD/store-files (default "store-files")
  -h, --help               help for fileserver
  -p, --port int           Port to listen on. (default 8080)

Global Flags:
      --cache string       Location of where to store cache data (defaults to $XDG_CACHE_DIR/hauler)
  -l, --log-level string    (default "info")
  -s, --store string       Location to create store at (default "store")
zackbradys@Zacks-MBP % hauler store serve fileserver --port 80
6:03PM INF copied artifacts to [store-files]
6:03PM INF starting file server on port [80]
zackbradys@Zacks-MBP % curl http://localhost:80                            
<pre>
<a href="install.sh">install.sh</a>
</pre>