Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@derrickstolee
Copy link
Collaborator

The git-bundle-web-server process runs the server process. It performs a very basic form of routing to ensure that the input route is still in the routes file, then serves the bundle-list or the requested .bundle file.

@derrickstolee derrickstolee self-assigned this Aug 30, 2022
Copy link

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Nice! I might learn me some Go just by reviewing your PRs. 🤣

@derrickstolee derrickstolee changed the title Add super-basic web server git-bundle-web-server: simple web-server process Sep 1, 2022

slash1 := strings.Index(path, "/")
if slash1 < 0 {
return "", "", "", fmt.Errorf("route has organization, but no repo")
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: I think the preferred term in owner rather than organization, no? :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've always thought of it as org/repo (where org can be a user). But I'll take your word for it because I expect you've thought about this a lot more than I have.

Use core.GetRepositories() to track which routes are available. Use a
basic form of {org}/{repo}[/[{file}]] route parsing. If {file} is blank,
then serve "bundle-list"
@derrickstolee derrickstolee changed the base branch from stolee/cli-4 to main September 21, 2022 15:03
@derrickstolee derrickstolee merged commit 6316ccf into main Sep 21, 2022
@vdye vdye deleted the stolee/web-1 branch May 3, 2023 17:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants