-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Milestone
Description
Currenlty, atomic-server depends on GitHub Pages for serving the front-end, because this line is present in the .html:
<script src="https://joepio.github.io/atomic-data-browser/dist/index.js" type="module"></script>
The advantage of this is that I can update the version for all servers, and possibly fix things that are broken.
The downsides:
- Depends on me not breaking things (especially for older server versions!)
- Depends on Github not being down
- Depends on having a working internet connection (which Atomic-Server actually doesn't require - as long as all resources are already present in the store)
So I want to include these files, ideally in the single executable Rust binary.
But how? The source code is in another repository, and the build process is separate.
Ideas:
- Use
rust-embedto include a directory https://crates.io/crates/rust-embed - Host it using
actix-files - https://github.com/kilork/actix-web-static-files or https://lib.rs/crates/actix-plus-static-files
Fetch them as part of compilation, make a bunch of Actix endpoints
- Lots of seperate files, duplicate code
I could add a script that runs yarn build from atomic-data-browser and then copies all the files to the atomic-server/static/browser folder. This folder can then be hosted using actix-web-static-files.
Metadata
Metadata
Assignees
Labels
No labels