This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 267
Container - Static file server for UI bundles #885
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… figure out oneshot::channel
…vers from the config file. No idea why it wont respond to requests
willemolding
changed the title
[WIP] - Container - Static file server for UI bundles
Container - Static file server for UI bundles
Jan 18, 2019
willemolding
changed the title
Container - Static file server for UI bundles
[WIP] - Container - Static file server for UI bundles
Jan 18, 2019
# Conflicts: # container_api/src/container/admin.rs # container_api/src/container/base.rs
…ochain/holochain-rust into container-static-file-server
lucksus
changed the title
[WIP] - Container - Static file server for UI bundles
Container - Static file server for UI bundles
Jan 18, 2019
lucksus
approved these changes
Jan 18, 2019
willemolding
commented
Jan 19, 2019
Ok(()) | ||
} | ||
|
||
// pub fn stop(&mut self) -> HolochainResult<()> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only part that needs to be finished. I guess this can wait until UI bundle CRUD interface though
zippy
approved these changes
Jan 19, 2019
@@ -607,7 +607,11 @@ pattern = ".*""# | |||
file.read_to_string(&mut config_contents) | |||
.expect("Could not read temp config file"); | |||
|
|||
let mut toml = String::from("bridges = []"); | |||
let mut toml = String::from( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it's ripe for refactoring as another add_block
unit?
… virtual routing in SPAs
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(This is @lucksus, wrapping up @willemolding's PR with description and last polish)
The two grey items in the center are part of this PR:
HTTP server
Uses hyper and hyper staticfile to create a light-weight HTTP server to serve front-end files.
Additions to container config
Two structs get added to the set of container config types:
Which look like this in the toml config file:
UI bundles are analogous to DNAs: adding one means installing it and making it available inside the container under a given ID. This does not yet instantiate this UI (same as with the DNA which needs to be used in an instance).
A UI bundle has to be connected to a DNA/zome interface (the websocket thing that connects to the container JSON RPC functions) in order to create a UI interface, kind of like an instance of the bundle. This is what gets served by the HTTP server on a given port.
The main reason for this is not part of this PR but coming up next: the UI needs to call back to the container to open a websocket connection. It needs to know which of potentially many websocket interfaces is meant for it. The container will insert this information into the package it is serving for each UI...