Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Revamp CLI serve syntax#45

Merged
chocolatkey merged 4 commits intodevelopfrom
revamped-serve-syntax
Jul 7, 2025
Merged

Revamp CLI serve syntax#45
chocolatkey merged 4 commits intodevelopfrom
revamped-serve-syntax

Conversation

@chocolatkey
Copy link
Member

@chocolatkey chocolatkey commented Jul 7, 2025

This changes the current readium serve <directory> [flags] syntax, moving the directory parameter to a --file-directory flag.
It also adds a --scheme/-s flag that accepts a list of schemes to enable for accessing content (file, http, https, s3, gs). file is enabled by default. If a scheme is not enabled, but relevant flags are specified, warnings are logged to help with troubleshooting. Certain schemes also require certain relevant flags.
To help with migration, an explanatory message is displayed if a <directory> argument is still provided (no arguments expected, base directory for local files is now set with a flag).
The Docker container has been modified to no longer embed any test publications, and instead by default run service http and https schemes only.

Example commands:

readium serve --s3-endpoint https://xxx --s3-access-key yyy --s3-secret-key zzz -s s3
readium serve --file-directory ./publications
readium serve -s http,https

Closes #23

@HadrienGardeur
Copy link
Member

Since file is used by default, is there a default directory as well?

@chocolatkey
Copy link
Member Author

@HadrienGardeur There is not. If you run the command without any arguments you will get Error: file scheme is enabled, but no local directory was specified with the --file-directory flag

Copy link
Member

@HadrienGardeur HadrienGardeur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chocolatkey chocolatkey merged commit 56ed5a9 into develop Jul 7, 2025
4 checks passed
@chocolatkey chocolatkey deleted the revamped-serve-syntax branch July 7, 2025 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for HTTP/HTTPS/S3/GCS should require an optional flag

2 participants